mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-03 02:10:49 +00:00
Update the stale issues workflow to run more frequently: - Weekdays: Every 4 hours (6x per day) at 00:00, 06:00, 12:00, 18:00 UTC - Weekends: Every hour (24x per day) Previously ran once daily at midnight UTC. This change reduces the time it will take for us to get through our backlog, particularly increasing the runs at the weekend, when we should have less other CI running, which it could impact due to GH API rate limiting. Assisted-by: IBM Bob Signed-off-by: stevenhorsman <steven@uk.ibm.com>
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
name: 'Stale issues with activity before a fixed date'
|
|
on:
|
|
schedule:
|
|
# Weekdays (Mon-Fri): Run every 4 hours
|
|
- cron: '0 0,4,8,12,16,20 * * 1-5'
|
|
# Weekends (Sat-Sun): Run every hour
|
|
- cron: '0 * * * 0,6'
|
|
workflow_dispatch:
|
|
inputs:
|
|
date:
|
|
description: "Date of stale cut-off. All issues not updated since this date will be marked as stale. Format: YYYY-MM-DD e.g. 2022-10-09"
|
|
default: "2022-10-09"
|
|
required: false
|
|
type: string
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
stale:
|
|
name: stale
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
actions: write # Needed to manage caches for state persistence across runs
|
|
issues: write # Needed to add/remove labels, post comments, or close issues
|
|
steps:
|
|
- name: Calculate the age to stale
|
|
run: |
|
|
echo AGE=$(( ( $(date +%s) - $(date -d "${DATE:-2022-10-09}" +%s) ) / 86400 )) >> "$GITHUB_ENV"
|
|
env:
|
|
DATE: ${{ inputs.date }}
|
|
|
|
- name: Run the stale action
|
|
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
|
with:
|
|
stale-pr-message: 'This issue has had no activity since before ${DATE}. Please comment on the issue, or it will be closed in 30 days'
|
|
days-before-pr-stale: -1
|
|
days-before-pr-close: -1
|
|
days-before-issue-stale: ${AGE}
|
|
days-before-issue-close: 30
|
|
operations-per-run: 100
|
|
env:
|
|
DATE: ${{ inputs.date }}
|