本文へ移動
cccskills
無料GitHub で公開

github-actions-prevent-waste

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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

日本語の概要は準備中です。原文の説明を表示しています。

stablyai/skills52026年10月17日 更新

stablyai のスキルをすべて見る

このスキルの問題を報告する