diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml index 0e18eaad1..6feabfeab 100644 --- a/.github/workflows/ci-docker.yml +++ b/.github/workflows/ci-docker.yml @@ -32,10 +32,6 @@ jobs: uses: docker/metadata-action@v5 with: images: antsx/ants - tags: | - type=ref,event=tag,enable=true,strip-prefix=v - type=ref,event=branch - type=ref,event=pr,prefix=pr- - name: Login to DockerHub if: github.event_name != 'pull_request' @@ -43,6 +39,12 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Edit tag for releases + run: | + META_TAG=${{ steps.meta.outputs.tags }} + STRIPPED_TAG=$( echo "${META_TAG#v}" ) + echo "DOCKER_TAG=${STRIPPED_TAG}" >> $GITHUB_ENV - name: Build and load (PR) or push (commit/tag) uses: docker/build-push-action@v5 @@ -50,7 +52,7 @@ jobs: context: . push: ${{ github.event_name != 'pull_request' }} load: ${{ github.event_name == 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ env.DOCKER_TAG }},${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Export Docker image for PR