Pre-commit: trufflehog v3.93.4, ruff v0.15.2, shellcheck v0.11.0.1, prettier v3.8.1, actionlint v1.7.11 Fly.io: pin nginx 1.28.2-alpine, bump alloy v1.5.1 -> v1.13.1 Forgejo workflows: pin actions/checkout to SHA (v4.3.1) Mise tasks: normalize httpx>=0.28.0, typer>=0.15.0 across all scripts Add how-to doc for the monthly tooling dependency update cycle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# Automated Branch Cleanup
|
|
#
|
|
# Deletes remote branches that have been merged into main and are older
|
|
# than a cutoff (default 30 days). Detects both fast-forward and
|
|
# squash-merged branches via the Forgejo API.
|
|
#
|
|
# Runs on a schedule (~every 10 days) and can be triggered manually
|
|
# with a custom cutoff for testing.
|
|
|
|
name: Branch Cleanup
|
|
|
|
on:
|
|
schedule:
|
|
# Approximately every 10 days: 1st, 11th, 21st of each month at 06:00 UTC
|
|
- cron: '0 6 1,11,21 * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
cutoff:
|
|
description: 'Delete branches older than N days'
|
|
required: false
|
|
default: '30'
|
|
type: string
|
|
|
|
jobs:
|
|
cleanup:
|
|
runs-on: k8s
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
|
|
- name: Run branch cleanup
|
|
env:
|
|
FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
CUTOFF="${{ inputs.cutoff || '30' }}"
|
|
echo "Running branch cleanup with cutoff=${CUTOFF} days..."
|
|
uv run --script mise-tasks/branch-cleanup \
|
|
--remote-only \
|
|
--yes \
|
|
--cutoff "$CUTOFF"
|