From c7edfdc8be02764ecb5e37178a2e98b7174c2ae0 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 22 Aug 2024 15:59:20 +0900 Subject: [PATCH] WORKFLOW: tenative fixes for the PR builds [skip ci] --- .github/workflows/cooker-selfhosted.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index d4a675c1..9e25c4c1 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -88,8 +88,8 @@ jobs: echo "MANIFEST_VERSION=$MANIFEST_VERSION" >> $GITHUB_ENV # Determine tag based on branch type - if [[ "$BRANCH_NAME" == refs/* ]]; then - pr_number=$(echo "${{ env.BRANCH_NAME }}" | awk -F'/' '{print $3}') + if [[ "$BRANCH_NAME" == refs/pull/* ]]; then + pr_number=$(echo "$GITHUB_REF" | awk -F'/' '{print $3}') source_branch=$(curl -s "https://api.github.com/repos/RetroDECK/RetroDECK/pulls/$pr_number" | jq -r '.head.ref' | tr '/' '-') TAG="PR-$pr_number-$source_branch-${{ env.buildid }}" else @@ -154,7 +154,6 @@ jobs: uses: ncipollo/release-action@v1 with: tag: "${{env.TAG}}" - commit: ${{ github.sha }} body: | # Release Notes (Cooker) This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}.