Files
workflow-stopper/README.md
T

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

  1. When a CI job fails in pezkuwi-sdk, the workflow-stopper action is triggered
  2. This action dispatches a workflow in this repository
  3. 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 with actions:write permission on pezkuwichain/pezkuwi-sdk

In the target repository (pezkuwichain/pezkuwi-sdk):

  • WORKFLOW_STOPPER_RUNNER_APP_ID - GitHub App ID
  • WORKFLOW_STOPPER_RUNNER_APP_KEY - GitHub App private key

GitHub App Setup

  1. Create a GitHub App in your organization settings
  2. Grant it actions:write permission
  3. Install it on both workflow-stopper and pezkuwi-sdk repositories
  4. 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)