From b4e1fe8f48e92b142a0b4a011fa78d2990a6f7de Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Mon, 28 Mar 2022 18:27:20 +0100 Subject: [PATCH] Avoid running the workflow twice on PR pushes 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`. --- .github/workflows/ci.yml | 1 + CHANGES/700.misc.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 CHANGES/700.misc.rst diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c947d6c7d..17d9d6cf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: branches: - master - ?.?* + types: [opened, reopened] schedule: - cron: '0 6 * * *' # Daily 6AM UTC build diff --git a/CHANGES/700.misc.rst b/CHANGES/700.misc.rst new file mode 100644 index 000000000..3e01c9e78 --- /dev/null +++ b/CHANGES/700.misc.rst @@ -0,0 +1 @@ +Updated the workflow events to avoid running the workflow matrix twice.