Skip to content

Commit

Permalink
Merge pull request #2179 from keboola/fix-race-image-name-ecr-docker-…
Browse files Browse the repository at this point in the history
…repository

fix: Name and tag of race image in docker repository should be different than production one
  • Loading branch information
Matovidlo authored Dec 11, 2024
2 parents b801927 + cbb010d commit 4a4b571
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
28 changes: 7 additions & 21 deletions .github/actions/push-image-aws-azure-gcp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,9 @@ runs:

- name: Push image to Amazon ECR
shell: bash
env:
IMAGE: ${{ inputs.imageName }}
TAG: ${{ inputs.imageTag }}
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ inputs.ecrRepository }}
run: |
docker tag $IMAGE:$TAG $REGISTRY/$REPOSITORY:$TAG
docker push $REGISTRY/$REPOSITORY:$TAG
docker tag ${{ inputs.imageName }}:${{ inputs.imageTag }} ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecrRepository }}:${{ inputs.imageTag }}
docker push ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecrRepository }}:${{ inputs.imageTag }}
- id: 'gcpAuth'
name: Authenticate to GCP
Expand All @@ -82,14 +77,9 @@ runs:

- name: Push image to GCP GAR
shell: bash
env:
IMAGE: ${{ inputs.imageName }}
TAG: ${{ inputs.imageTag }}
REGISTRY: ${{ inputs.gcpRegistry }}
REPOSITORY: ${{ inputs.gcpRepository }}
run: |
docker tag $IMAGE:$TAG $REGISTRY/$REPOSITORY:$TAG
docker push $REGISTRY/$REPOSITORY:$TAG
docker tag ${{ inputs.imageName }}:${{ inputs.imageTag }} ${{ inputs.gcpRegistry }}/${{ inputs.gcpRepository }}:${{ inputs.imageTag }}
docker push ${{ inputs.gcpRegistry }}/${{ inputs.gcpRepository }}:${{ inputs.imageTag }}
- name: Login to Azure ACR
uses: azure/docker-login@v2
Expand All @@ -100,11 +90,7 @@ runs:

- name: Push image to Azure ACR
shell: bash
env:
IMAGE: ${{ inputs.imageName }}
TAG: ${{ inputs.imageTag }}
REGISTRY: ${{ inputs.acrRegistry }}
REPOSITORY: ${{ inputs.acrRepository }}
run: |
docker tag $IMAGE:$TAG $REGISTRY/$REPOSITORY:$TAG
docker push $REGISTRY/$REPOSITORY:$TAG
docker tag ${{ inputs.imageName }}:${{ inputs.imageTag }} ${{ inputs.acrRegistry }}/${{ inputs.acrRepository }}:${{ inputs.imageTag }}
docker push ${{ inputs.acrRegistry }}/${{ inputs.acrRepository }}:${{ inputs.imageTag }}
4 changes: 2 additions & 2 deletions .github/workflows/release-service-stream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ jobs:
- name: Push Service image with race detector to Amazon ECR, Azure ACR and GCP GAR
uses: ./.github/actions/push-image-aws-azure-gcp
with:
imageName: ${{ env.IMAGE_NAME }}-race
imageTag: ${{ env.IMAGE_TAG }}
imageName: ${{ env.IMAGE_NAME }}
imageTag: ${{ env.IMAGE_TAG }}-race
ecrRegion: ${{ env.ECR_REGION }}
ecrRepository: ${{ env.ECR_REPOSITORY }}
ecrPushRole: ${{ env.ECR_PUSH_ROLE }}
Expand Down

0 comments on commit 4a4b571

Please sign in to comment.