-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.01 KB
/
pr-open.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 }}"