Housekeeping - Close stale issues # 工作流程名称:处理陈旧问题 workflow (dqzboy/Docker-Proxy)
The Housekeeping - Close stale issues # 工作流程名称:处理陈旧问题 workflow from dqzboy/Docker-Proxy, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Housekeeping - Close stale issues # 工作流程名称:处理陈旧问题 workflow from the dqzboy/Docker-Proxy repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Housekeeping - Close stale issues # 工作流程名称:处理陈旧问题
on:
schedule:
- cron: '0 9 * * *' # 定时触发:每天早上 9 点运行
jobs:
stale: # 作业名称
runs-on: ubuntu-latest # 在最新版本的 Ubuntu 环境中运行
steps:
- uses: actions/stale@v9.0.0 # 使用 GitHub 官方的 stale action,版本 9.0.0
with:
# 当问题被标记为陈旧时的提示消息
stale-issue-message: 'This issue is being marked stale due to a period of inactivity...'
# 当问题被关闭时的提示消息
close-issue-message: 'This issue was closed because it has been stalled for 30 days...'
# 问题在 60 天无活动后被标记为陈旧
days-before-issue-stale: 60
# 问题被标记为陈旧后,再过 30 天自动关闭
days-before-issue-close: 30
# 排除带有 "upcoming" 里程碑的问题
exempt-milestones: "upcoming"
# 每次运行处理的最大操作数量
operations-per-run: 1000
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Housekeeping - Close stale issues # 工作流程名称:处理陈旧问题 on: schedule: - cron: '0 9 * * *' # 定时触发:每天早上 9 点运行 jobs: stale: # 作业名称 timeout-minutes: 30 runs-on: latchkey-small # 在最新版本的 Ubuntu 环境中运行 steps: - uses: actions/stale@v9.0.0 # 使用 GitHub 官方的 stale action,版本 9.0.0 with: # 当问题被标记为陈旧时的提示消息 stale-issue-message: 'This issue is being marked stale due to a period of inactivity...' # 当问题被关闭时的提示消息 close-issue-message: 'This issue was closed because it has been stalled for 30 days...' # 问题在 60 天无活动后被标记为陈旧 days-before-issue-stale: 60 # 问题被标记为陈旧后,再过 30 天自动关闭 days-before-issue-close: 30 # 排除带有 "upcoming" 里程碑的问题 exempt-milestones: "upcoming" # 每次运行处理的最大操作数量 operations-per-run: 1000
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.