diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index 7786ecb16..d36df2096 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -2,8 +2,17 @@ name: Perform automated repository maintenance on: workflow_dispatch: - schedule: - - cron: "0 */2 * * *" + inputs: + dry-run: + description: "Dry-run" + type: boolean + operations: + description: "Max number of operations per run" + type: number +# Out of an abundance of caution, disabling automatic execution for now +# TODO: Reschedule job once expected behavior is consistently observed +# schedule: +# - cron: "0 */2 * * *" jobs: cleanup-inactive: @@ -17,6 +26,7 @@ jobs: total_days: 100 inactive_label: "no-activity" closed_label: "auto-closed" + default_operations: ${{ inputs.dry-run && 1000 || 30 }} steps: - name: Cleanup inactive issues/PRs uses: actions/stale@v9 @@ -36,6 +46,6 @@ jobs: labels-to-add-when-unstale: "needs-review" ascending: true enable-statistics: true - # DEBUG OPTIONS - debug-only: true - operations-per-run: 1000 + # CONFIG OPTIONS + debug-only: ${{ inputs.dry-run }} + operations-per-run: ${{ inputs.operations || env.default_operations }}