Skip duplicate action runs
nateberkopec opened this issue · comments
New PRs run actions twice, once for PR and once for push trigger. Let's fix that, either via https://github.com/marketplace/actions/skip-duplicate-actions#skip-duplicate-workflow-runs or something else.
New PRs run actions twice, once for PR and once for push trigger.
I haven't double checked this but I think this is only the case when the PR doesn't come from a fork (although it my run the tests in their fork too)
Actions allows filtering by branch for 'events'. Two standard events are 'push' and 'pull_request'.
If we filter branches in Actions, it affects both CI in this repo and forks.
Maybe an option is to filter branches on pushes here when the branch matches 'pr/**' or 'pr-*'?
Or, to create a branch here (puma/puma) for a PR, it must start with the above?
I've often run into this where a repo only allows 'push' events to run on active release branches. One creates a branch in their fork for a PR, and when it's pushed to the fork, CI doesn't run.
Then one has to screw around with rebasing master/main on the PR branch, running CI, then removing the commit(s) from master/main, etc.
I agree, it should continue to be easy to work in a fork
Summarizing for the benefit of those who want to contribute, the feature is:
Using https://github.com/marketplace/actions/skip-duplicate-actions#skip-duplicate-workflow-runs:
- Skip duplicate actions
- Skip concurrent actions
- Skip documentation-only changes using ignored paths
- Skip ragel tests if extension directory is not changed
- Cancel outdated workflow runs
Contributors can implement one or all of these features.
JFYI, I've brought this issue up in the actions/runner repo, it was suggested that I post elsewhere, see:
https://github.com/orgs/community/discussions/32809
Summarizing for the benefit of those who want to contribute, the feature is:
Using https://github.com/marketplace/actions/skip-duplicate-actions#skip-duplicate-workflow-runs:
- Skip duplicate actions
- Skip concurrent actions
- Skip documentation-only changes using ignored paths
- Skip ragel tests if extension directory is not changed
- Cancel outdated workflow runs
Contributors can implement one or all of these features.
hi @nateberkopec if this is still needed, I'd like to work on it.
Hi @MemunaHaruna, as we mention in CONTRIBUTING.md, if there's no PR open, it's ready for anyone to contribute! 😄