Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Run GitHub Actions workflows only once #10156

Merged
merged 2 commits into from
May 22, 2024

Conversation

Jubeki
Copy link
Contributor

@Jubeki Jubeki commented May 22, 2024

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:

Screenshot 2024-05-22 at 09 55 28

This PR adds constraints so that the workflow only runs once.
(Push Event will only be triggered on the master, *.x and 3.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

@Jubeki Jubeki changed the title [5.x] Run GitHub Actions workflows once [5.x] Run GitHub Actions workflows only once May 22, 2024
@jasonvarga
Copy link
Member

jasonvarga commented May 22, 2024

I removed 3.4 from the branch names. I'm fairly sure that if a PR/commit is send to that branch, it will use the rules from the tests.yml workflow on that branch.

@jasonvarga jasonvarga merged commit 8d53d95 into statamic:5.x May 22, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants