Skip to content

Commit 99e363e

Browse files
authored
Add docs for ignore_sha (#52)
Docs for PR #50
1 parent 62b179c commit 99e363e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Diff for: README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,24 @@ jobs:
5555
- _Note_: `workflow_id` can be a Workflow ID (number) or Workflow File Name (string)
5656
- _Note_: `workflow_id` also accepts a comma separated list if you need to cancel multiple workflows
5757

58-
At the time of writing `0.6.0` is the latest release but you can select any [release](https://github.com/styfle/cancel-workflow-action/releases).
58+
In some cases, you may wish to cancel workflows when you close a Pull Request. Because this is not a push event, the SHA will be the same, so you must use the `ignore_sha` option.
59+
60+
```yml
61+
on:
62+
pull_request:
63+
types: [closed]
64+
jobs:
65+
cleanup:
66+
name: 'Cleanup After PR Closed'
67+
runs-on: ubuntu-latest
68+
timeout-minutes: 3
69+
steps:
70+
- name: Cancel build runs
71+
uses: styfle/[email protected]
72+
with:
73+
ignore_sha: true
74+
workflow_id: 479426
75+
```
5976

6077
## Contributing
6178

0 commit comments

Comments
 (0)