From fe94d97d658c3f2cf3234ae6dbd2677f1593ba6c Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 9 Jan 2025 11:38:45 +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`. Signed-off-by: JP-Ellis --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7887c9a6..99e2297b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,13 @@ -on: [push, pull_request, workflow_dispatch] name: Test +on: + push: + branches: + - master + pull_request: + branches: + - master + env: PACT_BROKER_BASE_URL: https://testdemo.pactflow.io PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} @@ -76,7 +83,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Test dockerfile + - name: Test dockerfile run: make docker_test_all env: GO_VERSION: ${{ matrix.go-version }}