name: hestia gc # Garbage collection of the hestia binary cache (ci.yml) in the GitHub # Actions cache, so it stays within the 10 GB quota. After hestia's own # .github/workflows/gc.yml. Only on the default branch: PR scopes die with # their PR, the default branch's scope grows without GC. # A second GC's repack races the first one's pack deletes; queue manual runs # behind the nightly one. concurrency: group: hestia-gc cancel-in-progress: false on: schedule: - cron: "23 4 * * *" # daily 04:23 UTC workflow_dispatch: inputs: dry-run: description: Plan only; do not repack, touch, or delete anything. type: boolean default: false permissions: contents: read jobs: gc: runs-on: ubuntu-latest permissions: actions: write # REST cache deletes contents: read steps: - uses: cachix/install-nix-action@v31 # for HESTIA_BIN and the cache API tokens; read-only, so its post step # uploads nothing - uses: Mic92/hestia@v3 with: read-only: true - env: GITHUB_TOKEN: ${{ github.token }} DRY_RUN: ${{ inputs.dry-run && '--dry-run' || '' }} run: | # shellcheck disable=SC2086 # empty or one flag "$HESTIA_BIN" gc $DRY_RUN