Skip to content

Commit 2ab8dd1

Browse files
committed
feat | sprint1 | 없음 | flink 이미지 배포 설정 | 조수빈
1 parent 9df2ac2 commit 2ab8dd1

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/develop_pull_request.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Test and Build Image to ECR
22

33
on:
4-
pull_request:
4+
push:
55
branches:
66
- develop
77

@@ -31,4 +31,24 @@ jobs:
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

0 commit comments

Comments
 (0)