WORKFLOW: added calculation for generating a vaild tag for automated PR builds - fix [skip ci]

This commit is contained in:
XargonWan 2024-02-21 20:52:05 +01:00
parent ef1b73f984
commit 48d895f02b

View file

@ -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