Skip to content

Commit

Permalink
chore(ci): prevent duplicate ci triggers
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
JP-Ellis committed Jan 9, 2025
1 parent c1f0eaa commit fe94d97
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit fe94d97

Please sign in to comment.