From edbf56ba782d1d092ae7bc1684113d073ebfc2d0 Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:01:12 +0100 Subject: [PATCH] fix: Update docker.yml --- .github/workflows/docker.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 237f17b0c..a33def88e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,13 +4,12 @@ on: push: branches: - 3.x - release: - types: [published] jobs: push_to_registry: name: Build and push Docker image to Docker Hub runs-on: ubuntu-22.04 + if: startsWith(github.event.ref_name, 'release-') steps: - name: Check out the repo with the latest code @@ -27,7 +26,11 @@ jobs: - name: Get the current tag id: currentTag - run: git fetch --prune --unshallow && TAG=$(git describe --tags --abbrev=0) && echo $TAG && echo "TAG="$TAG >> "$GITHUB_ENV" + run: | + git fetch --prune --unshallow + TAG=$(git describe --tags --abbrev=0) + echo $TAG + echo "TAG=$TAG" >> $GITHUB_ENV - name: Build and push Docker image uses: docker/build-push-action@v6 @@ -36,4 +39,4 @@ jobs: push: true tags: | ${{ secrets.DOCKERHUB_REPOSITORY }}:latest - ${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }} \ No newline at end of file + ${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }}