Skip to content

Commit 7ea46e5

Browse files
avoid running CI twice per push: scope push trigger to master
Branches live in this repo, not forks, so a push to a branch with an open PR fired both push and pull_request for the same commit. push now only fires for master (a post-merge check); pull_request already covers every commit on a feature branch.
1 parent 3a2fa45 commit 7ea46e5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
# tests additionally need passwordless sudo and a kernel with BTF/BPF
33
# enabled, which isn't guaranteed on every runner, so we probe for working
44
# sudo first and only attempt them if it's there.
5+
#
6+
# `push` is scoped to master only: branches here live in this repo rather
7+
# than forks, so a push to a branch with an open PR would otherwise fire
8+
# both `push` and `pull_request` for the same commit, running everything
9+
# twice. `pull_request` covers feature branches; `push` still gives master
10+
# a post-merge check.
511

612
name: Test
713

814
on:
915
workflow_dispatch:
1016
push:
17+
branches: [master]
1118
pull_request:
1219

1320
jobs:

0 commit comments

Comments
 (0)