LoginSignup
3
0

More than 3 years have passed since last update.

[GitHub Actions]自動的に古いworkflowをキャンセルする

Last updated at Posted at 2020-03-09

CircleCIの Auto-cancel redundant builds のようなことを実現するやり方です。

下記のように、Github Actions build canceller の設定を行う。

workflows_filterには、workflowのnameを使用する。


name: build_canceller
on:
  pull_request:
jobs:
  build_canceller:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: stop old workflow
      uses: yellowmegaman/gh-build-canceller@v1.6
      with:
        github_token: ${{secrets.GITHUB_TOKEN}}
        workflows_filter: "Test"

これで多少節約できるはず。

参考

Github actions: Cancel redundant builds

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0