Skip to content

Commit

Permalink
Avoid running the workflow twice on PR pushes
Browse files Browse the repository at this point in the history
When someone force-pushes to a PR or adds a new commit, the workflow would run
_twice_, as both `push` and `pull_request` events would trigger.

The default for `types` is `[opened, reopened, synchronize]`; the latter is the
type that overlaps with `push`.
  • Loading branch information
mjpieters committed Mar 28, 2022
1 parent 42a5e2a commit b4e1fe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- master
- ?.?*
types: [opened, reopened]
schedule:
- cron: '0 6 * * *' # Daily 6AM UTC build

Expand Down
1 change: 1 addition & 0 deletions CHANGES/700.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated the workflow events to avoid running the workflow matrix twice.

0 comments on commit b4e1fe8

Please sign in to comment.