diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index aa054111..a725ff74 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -8,7 +8,7 @@ on: tags: ['*'] env: - IMG_TAGS: ${{ github.sha }} ${{ github.ref_name }} + IMG_TAGS: ${{ github.sha }} IMG_REGISTRY_HOST: quay.io IMG_REGISTRY_ORG: kuadrant MAIN_BRANCH_NAME: main @@ -22,9 +22,12 @@ jobs: uses: actions/checkout@v2 - name: Add latest tag if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }} - id: add-latest-tag run: | - echo "IMG_TAGS=latest" >> $GITHUB_ENV + echo "IMG_TAGS=${{ env.IMG_TAGS }} latest" >> $GITHUB_ENV + - name: Add branch name tag + if: ${{ github.ref_name != env.MAIN_BRANCH_NAME }} + run: | + echo "IMG_TAGS=${{ env.IMG_TAGS }} ${{ github.ref_name }}" >> $GITHUB_ENV - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Build Image