Skip to content

Commit

Permalink
ci: don't run CI twice for my own pull requests
Browse files Browse the repository at this point in the history
`on: [push, pull_request]` has the effect that CI runs twice if I push
to a feature branch in my repo and then make a pull request – once for
the push to the feature branch, and once for the PR.

Instead, only run CI on pushes to the main branch (and on all PRs).
  • Loading branch information
nico committed Aug 5, 2024
1 parent b0e25ed commit 36a1c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and test

on: [push, pull_request]
on: {push: { branches: [main] }, pull_request:}

jobs:
build:
Expand Down

0 comments on commit 36a1c86

Please sign in to comment.