File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ packages : write
12+ id-token : write
13+
14+ jobs :
15+ build-and-push :
16+ name : Build and Push
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Log in to Docker Hub
28+ uses : docker/login-action@v3
29+ with :
30+ username : ${{ secrets.DOCKERHUB_USERNAME }}
31+ password : ${{ secrets.DOCKERHUB_TOKEN }}
32+
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@v6
35+ with :
36+ context : .
37+ file : ./Dockerfile
38+ push : true
39+ tags : |
40+ ${{ secrets.DOCKERHUB_USERNAME }}/backend:latest
41+ ${{ secrets.DOCKERHUB_USERNAME }}/backend:${{ github.sha }}
42+ cache-from : type=gha
43+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change @@ -22,10 +22,9 @@ ENV NODE_ENV=production
2222
2323COPY --chown=nodejs:nodejs package.json yarn.lock ./
2424
25- RUN yarn install --production
25+ RUN yarn install --immutable
2626
2727COPY --chown=nodejs:nodejs --from=builder /app/dist ./dist
2828COPY --chown=nodejs:nodejs --from=builder /app/prisma/generated ./prisma/generated
2929
3030CMD ["node" , "dist/main" ]
31-
You can’t perform that action at this time.
0 commit comments