Skip to content

Clean up old Actions artifacts and caches automatically - #172

Merged
PrzemyslawKlys merged 1 commit into
masterfrom
fix/actions-artifact-housekeeping
Nov 30, 2026
Merged

PrzemyslawKlys merged 1 commit into
masterfrom
fix/actions-artifact-housekeeping

Conversation

@PrzemyslawKlys

@PrzemyslawKlys PrzemyslawKlys commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Run PowerForge housekeeping every six hours to reclaim storage from old Actions artifacts and caches. Scheduled runs apply deletions when the repository variable is enabled. Manual runs preview deletions by default, with the counts in the job summary.

Keep the three latest non-expired artifacts per name and artifacts from the past three days. Cap each run at 800 artifact deletions. The cache policy keeps the three latest entries per key and starts pruning older entries after 14 days.

Set repository Actions retention separately to three days.

Validated the workflow with actionlint and checked the policy against the pinned PowerForge schema.

Summary by CodeRabbit

  • Chores
    • Added scheduled and manually triggered housekeeping for stored artifacts and caches.
    • Cleanup runs only when explicitly enabled, and retains recent items while removing older ones within configured limits.
    • Runner housekeeping remains disabled.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T22:00:29.386387Z 6c262a3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds a GitHub housekeeping workflow that runs every six hours or on manual dispatch. It uses repository configuration for artifact and cache cleanup, with deletion application controlled by a manual input or repository variable.

Changes: GitHub housekeeping

Layer / File(s) Summary
Configure and run housekeeping
.powerforge/github-housekeeping.json, .github/workflows/github-housekeeping.yml
The configuration enables artifact and cache cleanup with retention limits and maximum deletion counts, and disables runner housekeeping. The workflow calls a pinned reusable workflow and controls deletion application based on the trigger.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • EvotecIT/EventViewerX#169: Sets artifact retention for a test archive workflow; this housekeeping workflow also configures artifact retention.
Merge Risk: Minimal · up to 6c262

This adds a scheduled housekeeping workflow that previews or deletes old Actions artifacts and caches while keeping the latest three entries and recent items. Scheduled deletion is opt-in through a repository variable, and the cleanup limits match the stated policy. No remaining merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Clean up old Actions artifacts and caches automatically" matches the main change. The PR adds a scheduled housekeeping workflow and a configuration file that delete old GitHub Actions artif…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Clean up old Actions artifacts and caches automatically" matches the main change. The PR adds a scheduled housekeeping workflow and a configuration file that delete old GitHub Actions artifacts and caches under retention and age limits. The title is specific and concise and does not overstate the scope.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78dd60a8-fdf1-43b3-9654-dbbae51d9663
Commits

Reviewing files that changed from the base of the PR and between 897fe28 and 6c262a3.

Files selected for processing: 2

  • .github/workflows/github-housekeeping.yml
  • .powerforge/github-housekeeping.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@PrzemyslawKlys
PrzemyslawKlys merged commit 773e868 into master Nov 30, 2026
23 checks passed
@PrzemyslawKlys
PrzemyslawKlys deleted the fix/actions-artifact-housekeeping branch November 30, 2026 22:19
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