Skip to content

Commit

Permalink
ci: prep for publishing (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Dec 6, 2023
1 parent 1c1585e commit 21f9351
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
)
Expand Down

0 comments on commit 21f9351

Please sign in to comment.