Skip to content

Commit

Permalink
Update CI to run for external contributors (#285)
Browse files Browse the repository at this point in the history
`push` only works for pushes to branches in the repository which means
pull requests from forks won't trigger it.

This change limits the workflow running on push to the `main` branch,
meaning everyone including maintainers with write access to this
repository will now need to open a PR to have CI run but this is
generally fine if you're already following a PR based flow (which most
people do), and avoids running the workflow twice for PRs (once for the
`push` trigger and then again for the `pull_request` trigger) which is a
little nicer on 🌎
  • Loading branch information
G-Rath authored Nov 26, 2023
1 parent 5c7dd48 commit 3c1ded8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI

on: [push]
on:
pull_request:
push:
branches:
- main

jobs:
build:
Expand Down

0 comments on commit 3c1ded8

Please sign in to comment.