From 5a88b9a955df47c5d1e2e0f82a4a55a330d371d3 Mon Sep 17 00:00:00 2001 From: MoritzWeber Date: Thu, 2 Nov 2023 14:15:32 +0100 Subject: [PATCH] ci: Tag Docker images with Git tag, not `HEAD` --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a42ca7f77..1babb36a5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -58,7 +58,7 @@ jobs: - name: Extract metadata for Docker id: tag run: | - echo "branch=$(git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g')" >> "$GITHUB_OUTPUT" + echo "branch=$(echo $GITHUB_REF_NAME | sed 's/[^a-zA-Z0-9.]/-/g')" >> "$GITHUB_OUTPUT" echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - name: Build and push Docker image id: build-and-push @@ -80,7 +80,7 @@ jobs: - name: Extract metadata for Docker id: tag run: | - echo "branch=$(git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g')" >> "$GITHUB_OUTPUT" + echo "branch=$(echo $GITHUB_REF_NAME | sed 's/[^a-zA-Z0-9.]/-/g')" >> "$GITHUB_OUTPUT" echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - name: Create k8s Kind Cluster uses: helm/kind-action@v1.3.0