From bb0138e6865a516b5413971879ceda1467fd2930 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 30 Sep 2022 17:27:45 -0400 Subject: [PATCH] Add section about versioning --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f49a2a6c..2874fdaf 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 }} ```