{"repo":"styfle/cancel-workflow-action","free":true,"listed":false,"github":"https://github.com/styfle/cancel-workflow-action","clone":"git clone https://github.com/styfle/cancel-workflow-action.git","description":"⏹️ GitHub Action to cancel previous running workflows on push","language":"TypeScript","stars":979,"topics":["workflows","actions","github-actions"],"license":"MIT","category":"workflow-automation","readme_excerpt":"[!IMPORTANT] You probably don't need to install this custom action. Instead, use the native concurrency property to cancel workflows, for example: Read GitHub's official documentation to learn more. Cancel Workflow Action This is a GitHub Action that will cancel any previous runs that are not completed for a given workflow. This includes runs with a status of queued or in progress . How does it work? When you git push , this GitHub Action will capture the current Branch and SHA. It will query GitHub's API to find previous workflow runs that match the Branch but do not match the SHA. These in-progress runs will be canceled leaving only this run, or the latest run. Read more about the Workflow Runs API. Usage Typically, you will want to add this action as the first step in a workflow so it can cancel itself on the next push. Versioning It is recommended to pin a specific version of this action so you don't automatically upgrade to the latest which could introduce breaking changes. Notice there is no v prefix, just the @major.minor.patch version. Visit Releases to find the latest version at the top of the page. Warning You might run into \"the uses' attribute must be a path, a Docker image, or owner/repo@ref\" error if you don't specify a version. Advanced: Canceling Other Workflows In some cases, you may wish to avoid modifying all your workflows and instead create a new workflow that cancels your other workflows. This can be useful when you have a problem with workflows getting ","default_branch":null,"files":null,"tree":[],"storefront":"/r/styfle","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/styfle/cancel-workflow-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}