From 48d895f02bd3e7ec3afad055e39d906de5f17d01 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 21 Feb 2024 20:52:05 +0100 Subject: [PATCH] WORKFLOW: added calculation for generating a vaild tag for automated PR builds - fix [skip ci] --- .github/workflows/cooker-selfhosted-persistent.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted-persistent.yml b/.github/workflows/cooker-selfhosted-persistent.yml index b2403330..14f28fbf 100644 --- a/.github/workflows/cooker-selfhosted-persistent.yml +++ b/.github/workflows/cooker-selfhosted-persistent.yml @@ -122,7 +122,7 @@ jobs: # if the branch is coming from a PR the tag should be manually built - name: "Generate version tag" run: | - if [[ "$BRANCH_NAME" == 'ref/'* ]]; then + if [[ "$BRANCH_NAME" == 'refs/'* ]]; then pr_number=$(echo ${{env.BRANCH_NAME}} | awk -F'/' '{print $3}') original_branch=$(git ls-remote --heads origin "refs/pull/$pr_number/head" | cut -d'/' -f3) echo "TAG=PR-$pr_number-$original_branch-${{ env.buildid }}" >> $GITHUB_ENV