mirror of
https://github.com/bitbaum/fleet.git
synced 2026-12-05 03:39:03 +01:00
Each job that used secrets.FLEET_PAT first mints an app token when vars.FLEET_APP_ID is set and uses it, falling back to FLEET_PAT otherwise, so nothing changes until the owner creates the app (docs/fleet-app-token.md). FLEET_PAT is one person's token over every repository; an app token lasts an hour and carries only the app's permissions. 56 uses in 31 workflows; actionlint reports nothing. Stacked on the daily package train, which edits the same workflow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmsUci3JMszzVB3ZhZZ
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
# Docs-truth sweep: does every repo's documentation describe its own code?
|
|
#
|
|
# The per-PR half lives in the auto-merge sweep (scripts/ci/auto-merge-sweep.sh,
|
|
# "the docs gate"): a PR may not ADD a finding, so new drift cannot merge in
|
|
# any repo that calls the sweep. This is the other half — it watches every
|
|
# default branch, including repos with no sweep and drift that arrived some
|
|
# other way, and holds the count per repo as a ratchet.
|
|
#
|
|
# Daily, because docs drift on the scale of merges, and the fleet merges many
|
|
# times a day; a weekly sweep would let a week of agent sessions read the same
|
|
# wrong sentence.
|
|
name: Docs truth
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '17 4 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: docs-truth
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
audit:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
# A short-lived GitHub App token when the app is configured
|
|
# (vars.FLEET_APP_ID, secrets.FLEET_APP_PRIVATE_KEY); FLEET_PAT otherwise.
|
|
- id: fleet-token
|
|
if: ${{ vars.FLEET_APP_ID != '' }}
|
|
uses: actions/create-github-app-token@v2
|
|
with:
|
|
app-id: ${{ vars.FLEET_APP_ID }}
|
|
private-key: ${{ secrets.FLEET_APP_PRIVATE_KEY }}
|
|
owner: bitbaum
|
|
- uses: actions/checkout@v7
|
|
|
|
# A detector that silently stopped detecting reports a clean fleet.
|
|
- name: The audit still detects, and still stays quiet
|
|
run: node scripts/ci/test-docs-truth-audit.mjs
|
|
|
|
# FLEET_PAT sees the private repos too; the default token sees this one.
|
|
- name: Every repo's docs agree with its tree
|
|
env:
|
|
GH_TOKEN: ${{ steps.fleet-token.outputs.token || secrets.FLEET_PAT || secrets.GITHUB_TOKEN }}
|
|
run: node scripts/ci/docs-truth-audit.mjs --sweep --check --list 2>&1 | tee -a "$GITHUB_STEP_SUMMARY"; exit "${PIPESTATUS[0]}"
|