From e351d865d25c697e868b17b8aae67e4dadb680e2 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Thu, 14 Mar 2024 13:40:44 -0400 Subject: [PATCH] Fix build tag in release GitHub action Signed-off-by: Nicko Guyer --- .github/workflows/docker_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_release.yml b/.github/workflows/docker_release.yml index 20cf94b4e..b58c9de96 100644 --- a/.github/workflows/docker_release.yml +++ b/.github/workflows/docker_release.yml @@ -49,7 +49,7 @@ jobs: - name: Set build tag id: build_tag_generator run: | - RELEASE_TAG=$(curl https://api.github.com/repos/${{ github.repository }}/releases/latest -s | jq .tag_name -r) + RELEASE_TAG=${{ github.ref_name }} BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_OUTPUT @@ -76,7 +76,7 @@ jobs: builder: ${{ steps.buildx.outputs.name }} push: true platforms: linux/amd64 - tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }},ghcr.io/${{ github.repository }}:head,${{ env.DOCKER_TAGS }} + tags: ghcr.io/${{ github.repository }}:${{ steps.build_tag_generator.outputs.RELEASE_TAG }},ghcr.io/${{ github.repository }}:head,${{ env.DOCKER_TAGS }} labels: | commit=${{ github.sha }} build_date=${{ steps.build_tag_generator.outputs.BUILD_DATE }}