File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Test and Build Image to ECR
22
33on :
4- pull_request :
4+ push :
55 branches :
66 - develop
77
3131 run : chmod +x ./gradlew
3232
3333 - name : Test
34- run : ./gradlew test
34+ run : ./gradlew test
35+
36+ - name : Configure AWS credentials
37+ uses : aws-actions/configure-aws-credentials@v2
38+ with :
39+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
40+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
41+ aws-region : ap-northeast-2
42+
43+ - name : Login to Amazon ECR
44+ id : login-ecr
45+ uses : aws-actions/amazon-ecr-login@v1
46+
47+ - name : Build, tag, and push image to ECR
48+ env :
49+ ECR_REGISTRY : ${{ secrets.AWS_ECR_REGISTRY }}
50+ ECR_REPOSITORY : ${{ secrets.AWS_ECR_REPOSITORY }}
51+ IMAGE_TAG : flink-latest
52+ run : |
53+ docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
54+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
You can’t perform that action at this time.
0 commit comments