- Event
- pull_request
- Branch
- feat/marketing-site-astro
- Commit
- d4af4fa
- Started
- Duration
- 5:24
Synced from GitHub
Budget gate
Took 0:05Whole log, 4 KB
Current runner version: '2.338.2'
▸ Runner Image Provisioner
Hosted Compute Agent
Version: 20261021.618
Commit: 21505ad2541d5be6135ed84fc33697146cf75b8e
Build Date: 2026-10-21T00:45:21Z
Worker ID: {d681d0ca-123e-4786-9587-64f5cc0eee31}
Region: eastus
Cloud: Azure
▸ Operating System
Ubuntu
26.04.1
LTS
▸ Runner Image
Image: ubuntu-26.04
Version: 20261025.179.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu26/20261025.179/images/ubuntu/Ubuntu2604-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu26%2F20261025.179
▸ GITHUB_TOKEN Permissions
Actions: write
Metadata: read
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: Budget gate
▸ Run visibility="$(gh api "repos/$REPO" --jq .visibility || echo unknown)"
visibility="$(gh api "repos/$REPO" --jq .visibility || echo unknown)"
if [ "$visibility" = public ]; then
echo "Public repository: hosted standard runners are not billed."
echo "ok=true" >> "$GITHUB_OUTPUT"
exit 0
fi
since="$(date -u +%Y-%m-01)"
# Count only runs that executed jobs; draft-PR runs skip every job.
runs="$(gh api --paginate "repos/$REPO/actions/workflows/ci.yml/runs?created=>=$since&status=completed&per_page=100" --jq '[.workflow_runs[] | select(.conclusion != "skipped")] | length' | awk '{n += $1} END {print n + 0}')"
echo "Executed CI runs this month: $runs of $MAX_RUNS (visibility: $visibility)"
if [ "$runs" -ge "$MAX_RUNS" ]; then
echo "ok=false" >> "$GITHUB_OUTPUT"
echo "::warning::Monthly CI budget reached; CI jobs skipped."
# Disable only when the repository is known to be private, so a
# failed visibility lookup cannot switch CI off for later runs.
if [ "$visibility" = private ]; then
gh api -X PUT "repos/$REPO/actions/workflows/ci.yml/disable" ||
echo "::warning::Could not disable the workflow; jobs stay skipped while the cap holds."
fi
else
echo "ok=true" >> "$GITHUB_OUTPUT"
fi
shell: /usr/bin/bash -e {0}
env:
MAX_RUNS: 150
GH_TOKEN: ***
REPO: collection-of-things/aggregate-mail
Public repository: hosted standard runners are not billed.
Evaluate and set job outputs
Set output 'ok'
Cleaning up orphan processes