Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Conserve resources by cancelling workflow runs for previous commits on a pull-request.

Notifications You must be signed in to change notification settings

Khan/pull-request-workflow-cancel

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

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pull Request Workflow Cancel

Conserve resources by cancelling workflow runs for previous commits on a pull-request. This differs from other "workflow cancelling" actions in that it allows you to cancel multiple workflows at once, and in that it's a javascript action (not a docker action), so it works on macos as well as linux, and executes extremely quickly.

Example usage:

name: Pull Request Workflow Cancel Example
on: [pull_request]

jobs:
  hello:
    runs-on: ubuntu-latest
    steps:
      - uses: khan/pull-request-workflow-cancel@1.0.0
        with:
          workflows: "example.yml | second.yml"
        env:
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
      # Now do whatever other stuff
      - uses: actions/checkout@v2
      - run: echo 'Running now'
      - run: sleep 30
      - run: echo 'wasnt cancelled'

About

Conserve resources by cancelling workflow runs for previous commits on a pull-request.

Resources

Stars

Watchers

Forks

Packages