Skip to content

Commit 733e87a

Browse files
authored
Merge pull request #8 from appwrite/pla-3693
feat: version pin to latest maildev version and add workflow for publish
2 parents ddf85c0 + 891b73b commit 733e87a

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Push to DockerHub
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
REGISTRY: docker.io
9+
IMAGE_NAME: appwrite/mailcatcher
10+
TAG: ${{ github.event.release.tag_name }}
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout the repo
17+
uses: actions/checkout@v3
18+
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v2
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v2
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v4
33+
with:
34+
context: .
35+
platforms: linux/amd64,linux/arm64
36+
push: true
37+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Base
2-
FROM alpine:3.15 as base
2+
FROM alpine:3.22 AS base
33
LABEL maintainer="[email protected]"
44

5-
ENV NODE_ENV production
5+
ENV NODE_ENV=production
66
RUN apk --upgrade add --no-cache nodejs openssl
77

88
# Build
9-
FROM base as build
9+
FROM base AS build
1010

1111
WORKDIR /root
1212
RUN apk --upgrade add --no-cache curl git npm
13-
RUN git clone https://github.com/maildev/maildev.git \
13+
RUN git clone --branch v2.2.1 https://github.com/maildev/maildev.git \
1414
&& mkdir build \
1515
&& cp maildev/package*.json build
1616

@@ -21,7 +21,7 @@ RUN npm install \
2121
&& rm package*.json
2222

2323
# Prod
24-
FROM base as prod
24+
FROM base AS prod
2525

2626
RUN adduser node -D
2727
USER node

0 commit comments

Comments
 (0)