-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
18 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -20,13 +20,25 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
uses: styfle/cancel-workflow-action | ||
#- name: Run Tests | ||
# uses: actions/setup-node@v1 | ||
# run: node test.js | ||
# ... etc | ||
``` | ||
|
||
### Versioning | ||
|
||
It is recommended to pin a specific version of this action so you don't automatically upgrade to the latest which could introduce breaking changes. | ||
|
||
```yml | ||
uses: styfle/[email protected] | ||
``` | ||
Notice there is no `v` prefix, just the `@major.minor.patch` version. | ||
|
||
Visit [Releases](https://github.com/styfle/cancel-workflow-action/releases) to find the latest version at the top of the page. | ||
|
||
### Advanced: Canceling Other Workflows | ||
|
||
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. | ||
|
@@ -43,7 +55,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.10.0 | ||
- uses: styfle/cancel-workflow-action | ||
with: | ||
workflow_id: 479426 | ||
``` | ||
|
@@ -72,7 +84,7 @@ jobs: | |
cancel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.10.0 | ||
- uses: styfle/cancel-workflow-action | ||
with: | ||
workflow_id: ${{ github.event.workflow.id }} | ||
``` | ||
|
@@ -92,7 +104,7 @@ jobs: | |
timeout-minutes: 3 | ||
steps: | ||
- name: Cancel build runs | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
uses: styfle/cancel-workflow-action | ||
with: | ||
ignore_sha: true | ||
workflow_id: 479426 | ||
|
@@ -113,7 +125,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.10.0 | ||
- uses: styfle/cancel-workflow-action | ||
with: | ||
all_but_latest: true | ||
``` | ||
|
@@ -134,7 +146,7 @@ jobs: | |
actions: write | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
uses: styfle/cancel-workflow-action | ||
with: | ||
access_token: ${{ github.token }} | ||
``` | ||
|