Skip to content

feat: add reusable cache-cleanup workflow#61

Merged
mbologna merged 1 commit into
mainfrom
add-cache-cleanup-workflow
Jul 4, 2026
Merged

feat: add reusable cache-cleanup workflow#61
mbologna merged 1 commit into
mainfrom
add-cache-cleanup-workflow

Conversation

@mbologna

@mbologna mbologna commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a reusable cache-cleanup.yml workflow that deletes GitHub Actions cache entries older than a configurable threshold (default: 7 days)
  • Prevents Docker buildx GHA cache from exceeding the 10 GB per-repo limit, which causes failed to reserve cache build failures
  • Uses actions/github-script to paginate through and delete stale entries

Usage

Calling repos add a scheduled workflow:

on:
  schedule:
    - cron: "0 4 * * 0"

jobs:
  cache-cleanup:
    uses: mbologna/.github/.github/workflows/cache-cleanup.yml@main
    with:
      max_age_days: 7

Test plan

  • Merge and reference from docker-bitlbee CI
  • Verify cache entries are cleaned up after scheduled run

🤖 Generated with Claude Code

Deletes GitHub Actions cache entries older than a configurable
threshold (default 7 days) to prevent buildx GHA cache from
exceeding the 10 GB per-repo limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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