Skip to content

ci: fail clearly when DOCS_BOT_TOKEN is missing or expired - #300

Merged
tas50 merged 1 commit into
mainfrom
ci/docs-drift-check
Nov 9, 2026
Merged

tas50 merged 1 commit into
mainfrom
ci/docs-drift-check

Conversation

@tas50

@tas50 tas50 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Addresses the failing Update generated docs job (run 42563483566).

Cause

DOCS_BOT_TOKEN no longer authenticates, so actions/checkout fails with could not read Username for 'https://github.com'. Docs have failed on every push to main since Aug 31; the last success was Jul 2. The secret was last set May 20, which fits an expired 90-day PAT. The checkout v7.0.1 bump landed at the same time but has no auth changes, and every other workflow checks out fine on it. release-readme-version.yml uses the same token and has failed on every release since at least Oct 8.

The secret has to be rotated: create a PAT with contents: write on this repo for an account on main's branch-protection bypass list, and save it as DOCS_BOT_TOKEN.

Change

Both workflows still push to main on merge or release. Each now checks the token first, before checkout, and fails with a message that names the problem and the fix:

  • secret not set
  • GitHub rejects the token (expired or revoked), including GitHub's error
  • token works but lacks push access

Testing

  • actionlint passes on both workflows.
  • Ran the check script locally: an empty token and a bogus token each fail with the expected message (the bogus one shows Bad credentials (HTTP 401)); a valid token with push access exits 0.

The docs workflow has failed on every push to main since Aug 31 with
git's "could not read Username for 'https://github.com'" from checkout,
because DOCS_BOT_TOKEN no longer authenticates. Check the token before
checkout in both workflows that use it and say what's wrong and how to
fix it.

Signed-off-by: Tim Smith <tsmith84@proton.me>
@tas50
tas50 force-pushed the ci/docs-drift-check branch from 51bd444 to 8318f8f Compare November 9, 2026 04:55
@tas50 tas50 changed the title ci: check generated docs instead of pushing them to main ci: fail clearly when DOCS_BOT_TOKEN is missing or expired Nov 9, 2026
@tas50
tas50 merged commit 84e33f9 into main Nov 9, 2026
6 checks passed
@tas50
tas50 deleted the ci/docs-drift-check branch November 9, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant