You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,25 @@ Visit [Releases](https://github.com/styfle/cancel-workflow-action/releases) to f
54
54
>
55
55
> You might run into "the `uses' attribute must be a path, a Docker image, or owner/repo@ref" error if you don't specify a version.
56
56
57
+
### Advanced: Canceling Workflows for Other Branches
58
+
59
+
By default, this action cancels workflows running in the same branch as itself. The `ignore_branch` flag allows to ignore the branch name when selecting workflows to cancel.
60
+
61
+
```yml
62
+
name: Cancel
63
+
on: [push]
64
+
jobs:
65
+
test:
66
+
name: 'Cancel Previous Runs'
67
+
runs-on: ubuntu-latest
68
+
timeout-minutes: 3
69
+
steps:
70
+
- uses: styfle/cancel-workflow-action
71
+
with:
72
+
ignore_branch: true
73
+
```
74
+
75
+
57
76
### Advanced: Canceling Other Workflows
58
77
59
78
In some cases, you may wish to avoid modifying all your workflows and instead create a new workflow that cancels your other workflows. This can be useful when you have a problem with workflows getting queued.
0 commit comments