/GithubActionTesting

Test github actions

Primary LanguageC#MIT LicenseMIT

GithubActionTesting

Learnings

Status checks

  • 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: Example
  • 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 and on pull_request you will trigger double builds if you don't specify branch filters for on push. As on pull_request by default will pickup all commits pushed as part of the "synchronize" event, so as long as you leave on pull_request as the default state or specify synchronize 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