Skip to content

Commit d0de26c

Browse files
committed
Build and Publish to ECR
1 parent d44c649 commit d0de26c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,26 @@ jobs:
5151
env:
5252
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5353
SONAR_HOST_URL: ${{ secrets.SONAR_URL }} #OPTIONAL
54+
55+
Build_AND_PUBLISH:
56+
needs: Testing
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Code checkout
60+
uses: actions/checkout@v4
61+
62+
- name: Build & Upload image to ECR
63+
uses: appleboy/docker-ecr-action@master
64+
with:
65+
access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
66+
secret_key: ${{ secrets.AWS_SECRER_ACCESS_KEY }}
67+
registry: ${{ secrets.REGISTRY }}
68+
repo: ${{ env.ECR_REPOSITORY }}
69+
region: ${{ env.AWS_REGION }}
70+
tags: latest, ${{ github.run_number }}
71+
daemon_off: false
72+
dockerfile: ./Dockerfile
73+
context: ./
5474

5575

5676

0 commit comments

Comments
 (0)