Files
computer-playbook/.github/workflows/cron-cleanup-stale.yml
T
kevinveenbirkenbachandClaude Opus 5.5 b055eece05 feat(ci): keep GitHub-hosted runner labels current through the updater
The workflows pin `runs-on: ubuntu-NN.NN`, so no job moves to a new Ubuntu
release behind our back, but nothing raised the pin either. A sixth job of
`🔄 Update versions` closes that: `utils/update/runner.py` reads the image
table of actions/runner-images, takes the newest x64 Ubuntu label whose
image carries no preview or beta badge, and raises every older bare
`runs-on: ubuntu-NN.NN` to it; arch-suffixed labels stay untouched. The job
opens the change as one PR over `.github/workflows`, so its CI run tests
the new image before it reaches main.

This commit carries the updater's first result: every job now runs on
ubuntu-26.04 (49 `runs-on`).

actionlint 1.7.12, the newest release, does not know `ubuntu-26.04` yet
(rhysd/actionlint#682, fix proposed in rhysd/actionlint#743), so
`.github/actionlint.yaml` declares the label until a release knows it.

act maps each `ubuntu-NN.NN` label the workflows use to the local platform
image, derived from `.github/workflows`, instead of a fixed list that did
not know ubuntu-26.04.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 16:56:52 +02:00

89 lines
2.6 KiB
YAML

name: "🧹 Prune stale data"
run-name: "${{ github.event_name == 'schedule' && '⏰ ' || '' }}🧹 Prune stale data"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
name: 🏷️ Close inactive issues and pull requests
runs-on: ubuntu-26.04
permissions:
issues: write
pull-requests: write
steps:
- name: 🏷️ Mark stale issues and pull requests
uses: actions/stale@v10
with:
days-before-issue-stale: 90
days-before-issue-close: 7
stale-issue-label: "stale"
stale-issue-message: >
This issue has been marked as stale because it has had no activity
for the last 90 days. It will be automatically closed in 7 days
unless there is further activity.
close-issue-message: >
This issue has been automatically closed due to inactivity.
days-before-pr-stale: 180
days-before-pr-close: 30
stale-pr-label: "stale"
stale-pr-message: >
This pull request has been marked as stale because it has had no
activity for the last 180 days. It will be automatically closed in
30 days unless there is further activity.
close-pr-message: >
This pull request has been automatically closed due to inactivity.
remove-stale-when-updated: true
delete-stale-branches:
name: 🌿 Delete inactive branches
runs-on: ubuntu-26.04
permissions:
contents: write
issues: write
steps:
- name: 🌿 Delete branches inactive for 360 days
uses: crs-k/stale-branches@e876b957ab08f0bad43c8cc271a22cdd7604bd09 # v9.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 350
days-before-delete: 360
branches-filter-regex: '^(?!main$|master$|develop$|dev$|release/|hotfix/)'
compare-branches: info
dry-run: false
cleanup-ghcr-ci-images:
name: 📦 Delete old GHCR CI images
runs-on: ubuntu-26.04
permissions:
contents: read
packages: write
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
- name: 📦 Install project environment
run: make install
- name: 📦 Delete ci-* images older than 60 days
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG: infinito-nexus
PACKAGE_PREFIX: core
MAX_AGE_DAYS: 60
TAG_PREFIX: ci-
run: bash scripts/github/cleanup/ghcr_ci_images.sh