Skip to content

feat: delete Actions caches nothing will read again, when asked - #74

Merged
vannt-dev merged 1 commit into
mainfrom
feat/cache-cleanup-module
Oct 20, 2026
Merged

vannt-dev merged 1 commit into
mainfrom
feat/cache-cleanup-module

Conversation

@vannt-dev

Copy link
Copy Markdown
Owner

What changes for users

  • New opt-in switch modules.cache_cleanup (off by default, in no preset). It writes
    .github/workflows/cache-cleanup.yml, the same workflow copied by hand into snap-video, aegis-net,
    network-overrides-devtools, browser-extension and dynamic-field-kit on 17/10:
    • on pull_request_target: closed, it deletes that pull request's caches;
    • a weekly sweep (Sunday 03:23 UTC, or started by hand) deletes the caches of closed pull requests and,
      per branch and kind of cache (key without its hash), copies left unused for more than a day longer
      than the newest one.
  • The job is inline, with only gh and jq and no third-party action, so Dependabot has nothing to bump
    in a managed file. Nothing is checked out.
  • GitLab: the switch writes nothing, and init/update/check print a note (there are no Actions caches).
  • init --interactive asks about it; the playground lists it, with the "needs repokeeper 0.11.0" note.
  • Docs: README list of switches in no preset, and a "Cache cleanup" section in docs/ci-and-releases.md.
  • The standard stays 1.4.4: output without the switch does not change (same as autoupdate, security
    and docker).

Verification

  • npm run typecheck, biome check ., npm test (489 passed), npm run build: all pass.
  • Ran node dist/cli.js init on a sample node repository with cache_cleanup: true. The generated
    cache-cleanup.yml has the same script as the hand-copied reference, and actionlint 1.7.12 reports
    nothing for all generated workflows.

modules.cache_cleanup, off unless asked for and in no preset, writes
.github/workflows/cache-cleanup.yml. When a pull request closes it deletes that
pull request's caches; a weekly sweep deletes the caches of closed pull requests
and, per branch and kind of cache, copies left unused for a day longer than the
newest one. The job uses only gh and jq, so Dependabot has nothing to bump in it.
It is the workflow copied by hand into five repositories on 17/10.

On GitLab the switch writes nothing and says so: there are no Actions caches.
@vannt-dev
vannt-dev merged commit 5a19c3f into main Oct 20, 2026
9 of 10 checks passed
vannt-dev added a commit that referenced this pull request Oct 20, 2026
It runs init once for each fixture: about 5 s locally, and it timed out at the
20 s default on the windows-latest runner for #74 before passing on a rerun.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant