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 5737728 commit c0491cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Test

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
Expand All @@ -19,4 +25,4 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
- run: "bundle install"
- run: "bundle exec rake"
- run: "bundle exec rake"

0 comments on commit c0491cf

Please sign in to comment.