Skip to content

Commit c7e8e75

Browse files
authored
MINOR: Restrict trigger push branch for GitHub Workflow (#1204)
Feature branches rarely need their own CI runs: the code is already tested when a pull request is opened against a release branch. If the push trigger has no branch restriction and pull_request is also configured, every push to a branch with an open PR runs the workflow twice: once for the push and once for the PR synchronisation. Always give the push trigger an explicit list of branches: this stops branches created from a release branch from inheriting its workflow runs. see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches ## What's Changed Please fill in a description of the changes here. **This contains breaking changes.** <!-- Remove this line if there are no breaking changes. --> Closes #NNN. Note that I needed to recreate a PR as the previous one was closed #1202 (comment) Signed-off-by: Aurélien Pupier <apupier@ibm.com>
1 parent 9e86331 commit c7e8e75

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/dev.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ name: Dev
1919

2020
on:
2121
pull_request: {}
22-
push: {}
22+
push:
23+
branches-ignore:
24+
- dependabot/**
2325

2426
concurrency:
2527
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}

0 commit comments

Comments
 (0)