Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Purge a pull request's Actions caches when it closes

Aperta Adatta ai principianti
#649 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions
Ambito
ci-cd

Direzione di ricerca

Inizia ispezionando i file di workflow del repository e la GitHub Actions cache API descritta nell'issue. Verifica che il workflow gestisca le chiusure di pull_request, utilizzi GITHUB_TOKEN con actions: write, rimuova solo le cache per la merge ref della pull request in chiusura, abbia esito positivo quando non ci sono cache corrispondenti e lasci inalterate le cache di branch-ref.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

CD enhancement
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_request with types: [closed].
  • It deletes every cache whose ref is refs/pull/<number>/merge for the pull request that just closed.
  • It uses the built-in GITHUB_TOKEN with permissions: 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/main and refs/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 with DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}.
  • The same problem exists in Fallout.Extensions.VSCode, tracked in Fallout-build/Fallout.Extensions.VSCode#25.
Lingua principale
C#
Stelle
164
Fork
19
Merge medio
3g 7h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Fallout-build/Fallout

Tutte le issue di Fallout-build/Fallout

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.