diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index e28416e0c..b4b716b8b 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -17,7 +17,6 @@ env: REGISTRY: ghcr.io # use DOCKERHUB_USERNAME as the name maybe different from the github username IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} - TAG: ${{ env.GITHUB_REF_NAME }} jobs: build: @@ -28,7 +27,11 @@ jobs: steps: - - name: Set tag for non-default branches + name: Set tag + run: echo "TAG=${{env.GITHUB_REF_NAME}}" >> $GITHUB_ENV + + - + name: Set tag if default branch if: ${{ env.GITHUB_REF_NAME == main || env.GITHUB_REF_NAME == v2_devel }} run: echo "TAG=latest" >> $GITHUB_ENV