Skip to content

Commit

Permalink
Feat: add ecr public alias in cicd script
Browse files Browse the repository at this point in the history
  • Loading branch information
junho100 committed Apr 25, 2024
1 parent 814d635 commit fd50233
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
- name: push base image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_ALIAS: i5i6z8x2
ECR_REPOSITORY: dev-hat629-ecr-user
run: |
docker build -t dev-hat629-ecr-user .
docker tag dev-hat629-ecr-user ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest
docker tag dev-hat629-ecr-user ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}
docker push ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }} --all-tags
docker tag dev-hat629-ecr-user ${{ env.ECR_REGISTRY }}/${{ env.ECR_ALIAS }}/${{ env.ECR_REPOSITORY }}:latest
docker tag dev-hat629-ecr-user ${{ env.ECR_REGISTRY }}/${{ env.ECR_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}
docker push ${{ env.ECR_REGISTRY }}/${{ env.ECR_ALIAS }}/${{ env.ECR_REPOSITORY }} --all-tags
- name: Check out k8s repo
uses: actions/checkout@master
Expand Down

0 comments on commit fd50233

Please sign in to comment.