> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Cancel GitHub workflow run

> Cancel or force-cancel a GitHub Actions workflow run.

`github.cancelWorkflowRun` requests cancellation of an active workflow run.

```ts automations/cancel-github-workflow.automation.ts theme={null}
import { automation } from "automate.ax"
import { github } from "automate.ax/github"

export default automation("Cancel GitHub workflow", () => {
  github.cancelWorkflowRun({
    force: false,
    owner: "SentsCo",
    repository: "automate.ax",
    runId: 123456789,
  })
})
```

Provide the repository and `runId`. `force` defaults to `false`; set it only when normal cancellation cannot stop the run. Returns `{}` after GitHub accepts the request. Cancellation is asynchronous, so use workflow-run triggers or `getWorkflowRun` to observe completion. Requires Actions write permission.
