feat: API call in main merge (#6) #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
merge_group: | |
pull_request: | |
push: | |
# branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Dump GitHub Context.Event | |
dump: | |
name: Event details | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Event details | |
run: | | |
echo "github.event_name: ${{ github.event_name }}" | |
echo "github.event.action: ${{ github.event.action }}" | |
# Test for PR, merge queue and merge to main | |
get-pr: | |
name: Get PR number | |
runs-on: ubuntu-22.04 | |
outputs: | |
pr: ${{ steps.vars.outputs.pr }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: vars | |
uses: ./ | |
verify-pr: | |
name: Verify PR number | |
needs: [get-pr] | |
env: | |
pr: ${{ needs.get-pr.outputs.pr }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Verify PR number | |
run: | | |
# Check needs.get-pr.outputs.pr | |
[ ! -z ${{ env.pr }} ]|| \ | |
(echo "No PR number" && exit 1) | |
echo "PR: ${{ env.pr }}" |