mirror of
https://github.com/pezkuwichain/workflow-stopper.git
synced 2026-04-21 23:47:58 +00:00
1.2 KiB
1.2 KiB
Pezkuwi Workflow Stopper
Stops all running and queued workflows in a repository when a CI job fails. This saves compute resources by preventing unnecessary workflow runs from continuing after a failure is detected.
How It Works
- When a CI job fails in
pezkuwi-sdk, theworkflow-stopperaction is triggered - This action dispatches a workflow in this repository
- The workflow uses GitHub API to cancel all running/queued workflows for the same commit SHA
Setup
Required Secrets
In this repository (pezkuwichain/workflow-stopper):
WORKFLOW_STOPPER_TOKEN- A GitHub PAT or App token withactions:writepermission onpezkuwichain/pezkuwi-sdk
In the target repository (pezkuwichain/pezkuwi-sdk):
WORKFLOW_STOPPER_RUNNER_APP_ID- GitHub App IDWORKFLOW_STOPPER_RUNNER_APP_KEY- GitHub App private key
GitHub App Setup
- Create a GitHub App in your organization settings
- Grant it
actions:writepermission - Install it on both
workflow-stopperandpezkuwi-sdkrepositories - Add the App ID and private key as secrets
Usage
This workflow is triggered via workflow_dispatch from the pezkuwi-sdk repository's CI pipelines.
License
Apache-2.0 (same as Pezkuwi SDK)