diff --git a/action.yml b/action.yml index 3a0cc87..5381fad 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: Conditional Container Builder with Fallback -description: Build if trigger conditions are met, else use fallback image +name: Get PR Number +description: Get PR number for mergue queues and squash merges branding: icon: package color: blue @@ -29,7 +29,7 @@ runs: - id: vars shell: bash run: | - # Get PR number (different process for merge queue) + # Get PR number (pull_request, merge_group or push) if [ ${{ github.event_name }} == 'pull_request' ] then echo "Event type: pull request" @@ -41,12 +41,10 @@ runs: elif [ ${{ github.event_name }} == 'push' ] then echo "Event type: push" - # HEAD=$(git log main --oneline | head -n1 | awk '{print $1}') - HEAD=${{ github.event.after }} pr=$(\ curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ inputs.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ github.repository }}/commits/${HEAD}/pulls \ + https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ | jq .[0].number )