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
+4-5
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This includes runs with a [status](https://docs.github.com/en/rest/reference/che
6
6
7
7
## How does it work?
8
8
9
-
When you `git push`, this GitHub Action will capture the current Branch and SHA. It will query GitHub's API to find previous workflow runs that match the Branch but do not match the SHA. These in-progress runs will be canceled leaving only this run.
9
+
When you `git push`, this GitHub Action will capture the current Branch and SHA. It will query GitHub's API to find previous workflow runs that match the Branch but do not match the SHA. These in-progress runs will be canceled leaving only this run, or the [latest run](#advanced-all-but-latest).
10
10
11
11
Read more about the [Workflow Runs API](https://docs.github.com/en/rest/reference/actions#workflow-runs).
12
12
@@ -100,10 +100,11 @@ jobs:
100
100
workflow_id: 479426
101
101
```
102
102
103
-
## Advanced: Cancel more recent workflows
103
+
## Advanced: All But Latest
104
104
105
105
Because this action can only cancel workflows if it is actually being run, it only helps if the pipeline isn't saturated and there are still runners available to schedule the workflow.
106
-
By default, this action does not cancel any workflows older than itself. The optional flag ``all_but_latest`` switches to a mode where the action also cancels itself and all later-scheduled workflows but the last one.
106
+
107
+
By default, this action does not cancel any workflows created after itself. The `all_but_latest` flags allows the action to cancel itself and all later-scheduled workflows, leaving only the latest.
107
108
108
109
```yml
109
110
name: Cancel
@@ -120,8 +121,6 @@ jobs:
120
121
access_token: ${{ github.token }}
121
122
```
122
123
123
-
At the time of writing `0.8.0` is the latest release but you can select any [release](https://github.com/styfle/cancel-workflow-action/releases).
0 commit comments