- Name the jobs in workflows so they can be referenced easier
- Workflow jobs won't automatically appear in the status check list, you need to search by the name and then an auto-complete prompt will appear where you can select the job as a status check:
- Skip required status checks for non-code changes by following this guide
- Status checks "on push" only wont trigger if a PR is made from a forked repo so to support that you also need "on pull_request" setup
- When doing both
on push
andon pull_request
you will trigger double builds if you don't specify branch filters foron push
. Ason pull_request
by default will pickup all commits pushed as part of the "synchronize" event, so as long as you leaveon pull_request
as the default state or specifysynchronize
in the types argument then every commit will result in a new build (along with opening/reopening the PR). - TLDR; Recommendation is
on: pull_request: push: branches: - main
- When doing both