From f13920af38e991b1c253b31e4b7ef9e0c66359d4 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 9 Jan 2025 10:43:31 +1100 Subject: [PATCH] chore(ci): prevent duplicate ci triggers Triggering on all 'push' and 'pull_request' events will result in duplicated CI runs in PRs (due to both conditions being met). Instead, trigger only on pushes to `master`, or updates to PRs targetting `master`. Also removed cron job as all updates to `master` are checked anyway. Signed-off-by: JP-Ellis --- .github/workflows/build.yml | 7 ++++--- .github/workflows/compatibility-suite.yml | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d075862..23037a88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,11 @@ name: Code Analysis & Test on: push: + branches: + - master pull_request: - # Once on the first of the month at 06:00 UTC - schedule: - - cron: 0 6 1 * * + branches: + - master concurrency: group: ${{ github.ref }} diff --git a/.github/workflows/compatibility-suite.yml b/.github/workflows/compatibility-suite.yml index a299c31f..b5abd8e3 100644 --- a/.github/workflows/compatibility-suite.yml +++ b/.github/workflows/compatibility-suite.yml @@ -1,6 +1,12 @@ name: Compatibility Suite -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - master env: PACT_DO_NOT_TRACK: true