mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 03:15:56 +00:00
Group the shell helpers under scripts/github/ into five subfolders that match how the workflow files consume them: runner/ host-runner hygiene (disk, swap, Docker daemon, diagnostics) cancel/ run cancellation on PR-close and branch-delete events resolve/ derivation of workflow inputs and outputs from repo state update/ scheduled Update: Versions pipeline release/ release-time gates Drop the now-redundant subfolder prefix from each filename, e.g. dump_runner_state.sh becomes dump_state.sh and cancel_pull_request_runs.sh becomes pull_request_runs.sh. Each subfolder carries a README that describes its scope per documentation.md rules; the top-level README points at the subfolders without inventorying files. Propagate the new paths through ten workflow files, three docs (workflow.md, pipeline.md, secrets.md), and two tests. Fix a real runtime bug in enlarge_swap.sh, which still referenced the pre-rename dump_runner_state.sh path. Extend the inline-block-size lint hint to describe the new subfolder convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
854 B
YAML
31 lines
854 B
YAML
name: "🚫 Cancel: PR Runs on Close"
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
- converted_to_draft
|
|
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
|
|
jobs:
|
|
cancel-pr-runs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Cancel active workflow runs for closed PR
|
|
shell: bash
|
|
env:
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
PR_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
REPOSITORY: ${{ github.repository }}
|
|
CURRENT_RUN_ID: ${{ github.run_id }}
|
|
run: bash scripts/github/cancel/pull_request_runs.sh
|