Please note: This repository is currently unmaintained by a team of developers at GitHub. The repository is here and you can use it as an example, or in Actions. However please be aware that we are not going to be updating issues or pull requests on this repository.
注意: このリポジトリはもうメンテナンスされません。
代わりに公式から提供されている concurrency を使用してください。
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
です。
on:
repository_dispatch:
types: [test]
# push:
# ...
name: Example
jobs:
firstJob:
name: First Job
runs-on: ubuntu-latest
steps:
# この GitHub Actions をこの workflow の中でできるだけ早く少なくとも一度は使用してください。
- 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 ID | 1234,2345 |