github: trigger all builds on main branch, and PR for any branch

The conditions for triggering Nix builds and other builds were
slightly different.

Nix builds triggered by PRs happened on PRs for any branch, not just
the `main` branch. That makes very little difference in practice
because PRs for other branches are very rare. Still, let's be
consistent. I decided to trigger the builds on PRs for any branch.

More importantly, Nix builds triggered by push were only done for
pushes to `master`, which is not what our main branch is called, so
those never happened.
This commit is contained in:
Martin von Zweigbergk 2022-05-06 09:03:56 -07:00 committed by Martin von Zweigbergk
parent 0d40a120f5
commit 31041ef46c
2 changed files with 3 additions and 3 deletions

View file

@ -2,9 +2,9 @@ name: build
on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
permissions: read-all

View file

@ -3,7 +3,7 @@ name: Nix on Linux
on:
push:
branches:
- master
- main
pull_request:
permissions: read-all