Purge a pull request's Actions caches when it closes
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions
- 領域
- ci-cd
調査の方向性
まず、リポジトリの workflow ファイルと、issue で説明されている GitHub Actions cache API を調査します。workflow が pull_request のクローズを処理し、actions: write を持つ GITHUB_TOKEN を使用し、クローズされる pull request の merge ref に対するキャッシュのみを削除し、一致するキャッシュがない場合も成功し、branch-ref のキャッシュを変更しないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Problem
Actions caches created for a pull request are never deleted when that pull request closes. They stay until GitHub evicts them after 7 days of no access. On 2026-08-19 this organisation held 5.95 GB of caches, and 4.3 GB of that was unused caches belonging to pull requests that were already merged or closed. Each repository on the Free plan gets 10 GB of cache. Filling it wastes the allowance and produces billing alert emails.
Outcome
When a pull request closes, the caches that belong only to that pull request are deleted automatically. No manual cleanup is needed.
Acceptance criteria
- A workflow runs on
pull_requestwithtypes: [closed]. - It deletes every cache whose
refisrefs/pull/<number>/mergefor the pull request that just closed. - It uses the built-in
GITHUB_TOKENwithpermissions: actions: write, not a personal access token. - The run succeeds when the pull request has no caches.
- Caches on branch refs such as
refs/heads/mainandrefs/heads/release/*are not touched.
Notes
- One cache on this repository was 589 MB for a single pull request (#640). It was deleted by hand on 2026-08-19.
- List caches with
GET /repos/{owner}/{repo}/actions/caches, delete withDELETE /repos/{owner}/{repo}/actions/caches/{cache_id}. - The same problem exists in
Fallout.Extensions.VSCode, tracked in Fallout-build/Fallout.Extensions.VSCode#25.
- 主要言語
- C#
- スター
- 172
- フォーク
- 21
- 平均マージ
- 4日 38分
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Fallout-build/Fallout のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Fallout-build/Fallout#729 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Fallout-build/Fallout#708 ·
メンテナーはふだん 2 日以内に返信
-
.\build.ps1 in its current state isn't capable for :add-package command対応中かも @ITaluone が 47 日前に担当しました。 オープンbug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Fallout-build/Fallout#670 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Fallout-build/Fallout#630 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement target/backlog
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
Fallout-build/Fallout#609 ·
メンテナーはふだん 2 日以内に返信
Fallout-build/Fallout の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
enhancement no-stack-trace
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
greenshot/greenshot#1618 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
squad/utforming status/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Altinn/altinn-studio#21565 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Tyrrrz/YoutubeDownloader#912 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信