Skip to content

Commit

Permalink
Add section about versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Sep 30, 2022
1 parent ceace68 commit bb0138e
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/cancel-workflow-action@0.9.1
```
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.
Expand All @@ -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
```
Expand Down Expand Up @@ -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 }}
```
Expand All @@ -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
Expand All @@ -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
```
Expand All @@ -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 }}
```
Expand Down

0 comments on commit bb0138e

Please sign in to comment.