Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions .github/workflows/actions-budget-watchdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,12 @@ name: 'Actions Budget Watchdog'
# deprioritises the congested boundaries first, and every schedule in this
# estate that fires reliably sits off them.
- cron: '41 */6 * * *'
# No inputs. The callee declares these as `type: number`, and forwarding a
# dispatch input through `${{ ... }}` yields a string, which the caller
# rejects before any job is created -- a zero-job run that reads exactly like
# an exhausted quota. The thresholds are set as literal YAML numbers below,
# where they are also easier to find.
workflow_dispatch:
inputs:
allowance-minutes:
description: 'Included standard-runner minutes per month (GitHub Team is 3000).'
required: false
type: number
default: 3000
warn-percent:
description: 'Warn at or above this percentage of the allowance.'
required: false
type: number
default: 70
critical-percent:
description: 'Fail and raise the alert at or above this percentage.'
required: false
type: number
default: 85

permissions:
contents: 'read'
Expand All @@ -54,9 +43,11 @@ jobs:
budget:
uses: 'JorisJonkers-dev/github-workflows/.github/workflows/actions-budget-watchdog.yml@main'
with:
allowance-minutes: "${{ inputs.allowance-minutes || 3000 }}"
warn-percent: "${{ inputs.warn-percent || 70 }}"
critical-percent: "${{ inputs.critical-percent || 85 }}"
# Literal numbers, not interpolated expressions: these inputs are
# `type: number` on the callee.
allowance-minutes: 3000
warn-percent: 70
critical-percent: 85
# The alert lands here rather than in the offending repo: the budget is
# an org-level fact, and when it is exhausted the private repos are
# exactly the ones that cannot run anything.
Expand Down
Loading