Skip to content

Commit f384fd0

Browse files
authored
Make workflows trigger on merge queue but skip jobs in merge queue (#20)
1 parent bca5c4d commit f384fd0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/codeowners-enforcement.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: "CodeOwners Enforcement"
22

33
on:
44
pull_request:
5+
merge_group:
56

67
jobs:
78
enforce-codeowners:
9+
if: ${{ github.event_name == 'pull_request' }}
810
name: "Enforce"
911
runs-on: ubuntu-latest
1012
permissions:
@@ -16,4 +18,3 @@ jobs:
1618
uses: smartcontractkit/.github/actions/codeowners-sanity-check@codeowners-sanity-check/v1
1719
env:
1820
GITHUB_TOKEN: ${{ github.token }}
19-

.github/workflows/codeowners-validation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: "CodeOwners Validation"
22

33
on:
44
pull_request:
5+
merge_group:
56

67
jobs:
78
# This job is necessary because the org-wide rulesets don't support event-based path filtering.
89
# (https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-pull_request-workflow-based-on-files-changed-in-a-pull-request)
910
# We include this job to filter the paths manually.
1011
filter-changes:
12+
if: ${{ github.event_name == 'pull_request' }}
1113
name: Filter changes
1214
runs-on: ubuntu-latest
1315
permissions:
@@ -31,7 +33,7 @@ jobs:
3133
permissions:
3234
contents: read
3335
id-token: write
34-
if: ${{ needs.filter-changes.outputs.codeowners == 'true' }}
36+
if: ${{ github.event_name == 'pull_request' && needs.filter-changes.outputs.codeowners == 'true' }}
3537
steps:
3638
- uses: actions/checkout@v4
3739
with:

.github/workflows/pr-draft-nudge.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ name: PR Draft Nudge
1212
on:
1313
pull_request:
1414
types: [opened]
15+
merge_group:
1516

1617
permissions: {}
1718

@@ -20,6 +21,7 @@ env:
2021

2122
jobs:
2223
pr-draft-nudge:
24+
if: ${{ github.event_name == 'pull_request' }}
2325
name: PR Draft Nudge
2426
runs-on: ubuntu-latest
2527
timeout-minutes: 10

0 commit comments

Comments
 (0)