build: "Quick Checks" to run for external contributions

The "push" event is only for pushes to branches within the same repository.

Since external contributors make commits in their own repositories rather than directly in the target repository, we also need the pull_request event to react to opening a pull request and to pushing new code to an external branch associated with a pull request.

Since internal pull requests would in principle trigger both "push" _and_ "pull_request", we also constrain the push event only to the branches we typically release from, on the assumption that all other branches will merge into those via pull requests. This avoids redundantly running the same checks in response to two events at the same time.
This commit is contained in:
Martin Atkins 2022-04-07 17:00:44 -07:00 committed by GitHub
parent 6d03303b79
commit 5b615882e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,14 @@
name: Quick Checks name: Quick Checks
on: on:
pull_request:
push: push:
branches:
- main
- 'v[0-9]+.[0-9]+'
- checks-workflow-dev/*
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
# This workflow runs for not-yet-reviewed external contributions and so it # This workflow runs for not-yet-reviewed external contributions and so it
# intentionally has no write access and only limited read access to the # intentionally has no write access and only limited read access to the