WORKFLOW: integrating new versioning flow with tags and single cooker branch - fix3

This commit is contained in:
XargonWan 2024-07-18 09:25:48 +09:00
parent 3adc2feba8
commit a5f0ae5ce9

View file

@ -65,7 +65,7 @@ jobs:
- name: "Generate version tag"
run: |
source automation_tools/version_extractor.sh
manifest_version="$($fetch_manifest_version)"
echo "MANIFEST_VERSION=$($fetch_manifest_version)" >> $GITHUB_ENV
if [[ "$BRANCH_NAME" == 'refs/'* ]]; then
pr_number=$(echo ${{env.BRANCH_NAME}} | awk -F'/' '{print $3}')
source_branch=$(curl -s "https://api.github.com/repos/XargonWan/RetroDECK/pulls/$pr_number" | jq -r '.head.ref')
@ -73,7 +73,7 @@ jobs:
echo "[DEBUG] source branch is: $source_branch"
echo "TAG=PR-$pr_number-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV
else
echo "TAG=${{$manifest_version}}-${{ env.buildid }}" >> $GITHUB_ENV
echo "TAG=${{ env.MANIFEST_VERSION }}-${{ env.buildid }}" >> $GITHUB_ENV
fi
echo "Version TAG: ${{ env.TAG }}"