Please note: This repository is no longer maintained.
Please use the concurrency provided by the officials instead.
on: push
jobs:
test:
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
- run: echo step1
- run: echo step2
# ...
↓
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
jobs:
test:
steps:
- run: echo step1
- run: echo step2
# ...
Read this in other languages: English, 日本語.
GitHub Actions to automatically cancel redundant workflow.
on:
repository_dispatch:
types: [test]
# push:
# ...
name: Example
jobs:
firstJob:
name: First Job
runs-on: ubuntu-latest
steps:
# Use this GitHub Actions at least once in this workflow as soon as possible.
- uses: technote-space/auto-cancel-redundant-workflow@v1
# Run any steps
- name: any steps
run: echo test
# ...
# Run any jobs
secondJob:
name: Second Job
needs: firstJob
runs-on: ubuntu-latest
steps:
- run: echo test
# ...
e.g.
name | description | e.g. |
---|---|---|
ids | Run IDs of the cancelled workflow. | 1234,2345 |