File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Backend Container Build and Push
2+
3+ on :
4+ push :
5+ branches :
6+ - 74-base-image
7+ paths :
8+ - ' example/backend/app/**'
9+
10+ jobs :
11+ deploy :
12+ runs-on : arc-runner-set
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+
17+ - name : Login to ECR
18+ uses : docker/login-action@v3
19+ with :
20+ registry : ACCOUNTID.dkr.ecr.ap-northeast-2.amazonaws.com
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+ with :
25+ driver : kubernetes
26+ driver-opts : |
27+ namespace=arc-runners
28+
29+ - name : Set image tag (date)
30+ run : echo "IMAGE_TAG=$(TZ='Asia/Tokyo' date +'%Y%m%d%H%M')" >> $GITHUB_ENV
31+
32+ - name : Build and push
33+ uses : docker/build-push-action@v6
34+ env :
35+ DOCKER_BUILD_SUMMARY : false
36+ with :
37+ context : ./example/backend/app
38+ push : true
39+ provenance : false
40+ tags : ACCOUNTID.dkr.ecr.ap-northeast-2.amazonaws.com/backend:${{ env.IMAGE_TAG }}
Original file line number Diff line number Diff line change 1- FROM node:18
1+ FROM node:18.20.8-slim
22WORKDIR /app
33COPY package*.json ./
44RUN npm install --production
You can’t perform that action at this time.
0 commit comments