File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - name : Checkout repository
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Set up Docker Buildx
16
+ uses : docker/setup-buildx-action@v1
17
+
18
+ - name : Log in to GitHub Container Registry
19
+ uses : docker/login-action@v1
20
+ with :
21
+ registry : ghcr.io
22
+ username : ${{ github.actor }}
23
+ password : ${{ secrets.GITHUB_TOKEN }}
24
+
25
+ - name : Build and push Docker image
26
+ uses : docker/build-push-action@v2
27
+ with :
28
+ context : .
29
+ file : ./Dockerfile
30
+ push : true
31
+ tags : ghcr.io/${{ github.repository_owner }}/token-registry-api:${{ steps.get_latest_tag.outputs.tag }}
32
+ build-args : |
33
+ DBSYNC_TAG=${{ steps.get_latest_tag.outputs.tag }}
Original file line number Diff line number Diff line change 1
1
# Base image
2
2
FROM node:20-alpine as base
3
3
4
+ # Install Git
5
+ RUN apk add --no-cache git
6
+
4
7
# Set the working directory inside the container
5
8
WORKDIR /app
6
9
@@ -23,9 +26,14 @@ RUN yarn install --frozen-lockfile
23
26
# Build the application (ensure you have a 'build' script in package.json)
24
27
RUN yarn build
25
28
29
+ RUN node dist/forceClone.js
30
+
26
31
# Production stage
27
32
FROM node:20-alpine as prod
28
33
34
+ # Install Git in production stage as well
35
+ RUN apk add --no-cache git
36
+
29
37
WORKDIR /app
30
38
31
39
# Install production dependencies
You can’t perform that action at this time.
0 commit comments