Skip to content

yellowmegaman/gh-build-canceller

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Actions build canceller

A GitHub Action for cancelling old PR builds.

How it works

  • 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 status in_progress|queued on the different GIT SHA and kills 'em

GitHub Actions

# 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.