Skip to content

Auto-Cleanup

Auto-Cleanup #68

Workflow file for this run

# Periodically cleans up the codebase and maintains a refactor PR.
# SETUP: Add ANTHROPIC_API_KEY to repository secrets.
name: Auto-Cleanup
on:
schedule:
- cron: '0 */4 * * *' # Every 4 hours
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
- name: Cleanup with mux
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
[ -z "$ANTHROPIC_API_KEY" ] && echo "Skipping (no API key)" && exit 0
bunx mux@next run \
--model anthropic:claude-opus-4-6 \
--thinking xhigh \
< .github/prompts/auto-cleanup.md