File tree Expand file tree Collapse file tree 2 files changed +53
-3
lines changed
Expand file tree Collapse file tree 2 files changed +53
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Docker build and publish
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ env :
9+ REGISTRY : ghcr.io
10+ IMAGE_NAME : ${{ github.repository }}
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ packages : write
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Set up QEMU
24+ uses : docker/setup-qemu-action@v3
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Log into registry ${{ env.REGISTRY }}
30+ uses : docker/login-action@v3
31+ with :
32+ registry : ${{ env.REGISTRY }}
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : Extract metadata (tags, labels) for Docker
37+ id : meta
38+ uses : docker/metadata-action@v5
39+ with :
40+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41+
42+ - name : Build and push Docker image
43+ id : build-and-push
44+ uses : docker/build-push-action@v6
45+ with :
46+ context : .
47+ platforms : linux/amd64,linux/arm64
48+ push : true
49+ tags : ${{ steps.meta.outputs.tags }}
50+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 11FROM node:20.18.0-slim AS build
22WORKDIR /app
33COPY . ./
4- RUN npm ci
5- RUN npx nx reset
6- RUN npm run build
4+ RUN npm ci \
5+ && npx nx reset \
6+ && npm run build
77
88# production environment
99FROM nginxinc/nginx-unprivileged:1.27.2-alpine3.20
You can’t perform that action at this time.
0 commit comments