Skip to content

Commit 21cd016

Browse files
authored
chore(ci): Restrict trigger push branch for GitHub Workflow (#4458)
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 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
1 parent 2bd8778 commit 21cd016

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/csharp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ name: C#
1919

2020
on:
2121
push:
22+
branches-ignore:
23+
- 'dependabot/**'
2224
paths:
2325
- '.github/workflows/csharp.yml'
2426
- 'ci/scripts/csharp_*'

.github/workflows/dev_adbc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ on:
2525
- "dev/**"
2626
- ".github/workflows/dev_adbc.yml"
2727
push:
28+
branches-ignore:
29+
- 'dependabot/**'
2830
paths:
2931
- "dev/**"
3032
- ".github/workflows/dev_adbc.yml"

0 commit comments

Comments
 (0)