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 8230d48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build and test

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
build:
Expand Down

0 comments on commit 8230d48

Please sign in to comment.