Skip to content
cccskills
FreePublished on GitHub

github-actions-prevent-waste

Reduce wasted GitHub Actions PR checks with stable concurrency keys, cancellation of superseded runs, and job-level draft guards.

The English summary is being prepared. Showing the original description.

Works withGitHub
See how to install

Files included (1)

  • SKILL.md1.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Prevent wasted GitHub Actions runs

For PR checks, cancel superseded runs and skip jobs while the PR is a draft:

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true
  • Keep keys stable across commits: use a unique workflow prefix and PR number or ref, never a commit SHA or run ID. Reusable workflows inherit the caller's github.workflow; keep caller and callee concurrency keys distinct.
  • Add github.event.pull_request.draft != true to each check job's existing if, including reusable-workflow callers and aggregate jobs. Job guards prevent runner allocation; step guards still allocate runners.
  • Preserve existing triggers when adding ready_for_review and converted_to_draft. The former starts checks when review begins; the latter lets a replacement run cancel old work before its jobs skip.
  • Concurrency cancellation needs a new run in the same group. If path filters prevent that run, use a trusted cleanup workflow on PR updates to cancel only older heads, rechecking the current head before cancellation. Never check out PR code in privileged cleanup.

References: concurrency, PR events.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Reference for concurrent steps within a GitHub Actions job and the background, wait, wait-all, cancel, and parallel keywords.

The English summary is being prepared. Showing the original description.

stablyai/skills5Updated Oct 17, 2026

See all skills by stablyai

Report a problem with this skill