GitHub Action
GH actions stale run canceller
master
Latest version
A GitHub Action for cancelling old PR builds.
- Action is looking for workflows on current repo
- To limit in which workflows we want to kill old builds, you can use "worflow1|workflow2" as a value for
workflow_filter
parameter. - Action is looking then for
older
builds that have statusin_progress|queued
on the different GIT SHA and kills 'em
# File: .github/workflows/shot.yml
name: build_canceller
on:
pull_request:
jobs:
build_canceller:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: shot
uses: yellowmegaman/[email protected]
with:
github_token: ${{secrets.PERSONAL_TOKEN}}
workflows_filter: "CI|pr"
This will automatically kill all old builds on this PR branch.