This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
# Pull Request Workflow Cancel | ||
|
||
Conserve resources by cancelling workflow runs for previous commits on a pull-request. | ||
Conserve resources by cancelling workflow runs for previous commits on a pull-request. | ||
This differs from other "workflow cancelling" actions in that it allows you to cancel multiple workflows at once, and in that it's a javascript action (not a docker action), so it works on macos as well as linux, and executes extremely quickly. | ||
|
||
Example usage: | ||
```yaml | ||
name: Pull Request Workflow Cancel Example | ||
on: [pull_request] | ||
|
||
jobs: | ||
hello: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: khan/pull-request-workflow-cancel@master | ||
with: | ||
workflows: "example.yml | second.yml" | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
# Now do whatever other stuff | ||
- uses: actions/checkout@v2 | ||
- run: echo 'Running now' | ||
- run: sleep 30 | ||
- run: echo 'wasnt cancelled' | ||
``` |