File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/ci.yml
2+ name : CI Test - Build & Push to ECR
3+
4+ on :
5+ push :
6+ branches :
7+ - develop
8+ - ci/test
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Configure AWS credentials
19+ uses : aws-actions/configure-aws-credentials@v4
20+ with :
21+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
22+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+ aws-region : ap-northeast-2
24+
25+ - name : Login to Amazon ECR
26+ id : login-ecr
27+ uses : aws-actions/amazon-ecr-login@v2
28+
29+ - name : Build, tag, and push Docker image to ECR
30+ env :
31+ ECR_REGISTRY : 618221165332.dkr.ecr.ap-northeast-2.amazonaws.com
32+ ECR_REPOSITORY : data-server
33+ IMAGE_TAG : ${{ github.sha }}
34+ run : |
35+ docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
36+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
You can’t perform that action at this time.
0 commit comments