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

feat: add ignore_branch flag to cancel workflows in all branches #207

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpontus
Copy link

@mpontus mpontus commented May 24, 2023

@@ -12,6 +12,10 @@ inputs:
description: 'Optional - Allow canceling other workflows with the same SHA. Useful for the `pull_request.closed` event.'
required: false
default: 'false'
ignore_branch:
description: 'Optional - Allow canceling workflows in all branches.'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: 'Optional - Allow canceling workflows in all branches.'
description: 'Optional - Allow canceling workflows, regardless of branch.'

- uses: styfle/cancel-workflow-action
with:
ignore_branch: true
```
Copy link
Owner

@styfle styfle May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move this new section below ### Advanced: SHA since I think it wont be a common use case.

Also lets call it ### Advanced: Ignore Branch

@mpontus
Copy link
Author

mpontus commented May 31, 2023

@styfle I want to apologize for opening this PR prematurely. I did not intend to open a PR before testing the change, but somehow the auto-pilot took over and did it anyway. I had a chance to try my changes shortly afterward, and I could not get it to work having the ignore_branch option enabled always resulted in no matched workflows.

I did this testing on a private repo and I didn't have a chance to investigate the issue further since then. I will try to find a better option to test my changes and perform diagnostics in the open.

I appreciate your responsiveness to my PR. I will try to return with an update shortly.

@styfle styfle marked this pull request as draft October 3, 2023 15:51
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.

Cancel previous runs of same workflow id on all branches
2 participants