Skip to content

Commit

Permalink
let use env variable for ecr registry
Browse files Browse the repository at this point in the history
  • Loading branch information
azatsafin committed Oct 9, 2024
1 parent c32dec6 commit 4127516
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build-public-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
aws-region: us-east-1
role-to-assume: arn:aws:iam::187584688086:role/github-actions-ecr-poweruser
role-to-assume: ${{ secrets.AWS_ROLE }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
Expand All @@ -67,7 +66,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
context: api
push: true
tags: public.ecr.aws/s0v8j8q9/kafbat/kafka-ui:${{ steps.extract_branch.outputs.tag }}
tags: ${{ vars.ECR_REGISTRY }}/${{ github.repository }}:${{ steps.extract_branch.outputs.tag }}
build-args: |
JAR_FILE=api-${{ steps.build.outputs.version }}.jar
cache-from: type=local,src=/tmp/.buildx-cache
Expand All @@ -77,6 +76,6 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Image published at public.ecr.aws/s0v8j8q9/kafbat/kafka-ui:${{ steps.extract_branch.outputs.tag }}
Image published at ${{ vars.ECR_REGISTRY }}/${{ github.repository }}:${{ steps.extract_branch.outputs.tag }}
outputs:
tag: ${{ steps.extract_branch.outputs.tag }}

0 comments on commit 4127516

Please sign in to comment.