From 9ceaa327c091165c8be44bc914b029e28d28b849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nussbaumer?= Date: Wed, 24 Nov 2021 08:36:18 +0100 Subject: [PATCH] build: add TAG env before ko publish --- .github/workflows/publish.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2147993..0cca82e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -70,8 +70,9 @@ jobs: KO_DOCKER_REPO: docker.io/postfinance - name: Run ko publish run: | + export TAG=$(echo ${{ github.ref }} | cut -d "/" -f 3 - ) export COMMIT=$(git describe --abbrev=7 --always --long --match "v*" main) - ko publish ./cmd/kubelet-csr-approver/ --base-import-paths --tags $tag + ko publish ./cmd/kubelet-csr-approver/ --base-import-paths --tags $TAG publish-untagged: if: "!startsWith(github.ref, 'refs/tags/v')"