Skip to content

Commit

Permalink
ci: fix dependabot duplicated workflow runs
Browse files Browse the repository at this point in the history
Every workflow is being executed twice for dependabot: Once when its
branch is pushed to this repository and again when a PR is opened for
it.

For example, see the checks in #5979 ("29 checks passed").

This happens because both `on.push` and `on.pull_request` are specified
in the workflow files.

There does not seem to be a simple and generic way to avoid such
duplicated runs directly in GitHub Actions (such as preventing the same
check from running for the same exact commit)[1], so just ignore the
dependabot branches on push for now.

See also and commit 5871b08 ("ci: run for every branch instead of just
master", 2023-04-23) / PR #5815.

[1] https://github.com/orgs/community/discussions/26276
  • Loading branch information
kmk3 committed Aug 28, 2023
1 parent f235c8f commit 0cc56a7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Build-extra

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'm4/**'
- 'src/**.c'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Build
# Note: Keep this list in sync with DISTFILES in ../../Makefile.
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'contrib/**'
- 'etc/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Check-C

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'm4/**'
- 'src/**.c'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Check-Profiles

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'ci/check/profiles/**'
- 'etc/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Check-Python

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '**.py'
- .github/workflows/check-python.yml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Codespell

on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- 'm4/**'
- COPYING
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: Test

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'm4/**'
- 'src/**.c'
Expand Down

0 comments on commit 0cc56a7

Please sign in to comment.