[5.x] Run GitHub Actions workflows only once #10156
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When creating a PR from a branch within the same repo (i.e. not a fork), the current tests workflows gets triggered twice - for both push and pull_request:
This PR adds constraints so that the workflow only runs once.
(Push Event will only be triggered on the
master
,*.x
and3.4
branch, See supported versions according to https://statamic.dev/release-schedule-support-policy#support-policy)I already created a similar PR for the Laravel Framework, with my main reasons being that it is annoying to see always two test runs, double the run time and for environmental reasons of course:
laravel/framework#44053
Branch names can use patterns for Pull Requests:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet