Skip to content

Use GITHUB_TOKEN instead of ADMIN_PAT in release workflows - #90

Closed
n13 wants to merge 1 commit into
mainfrom
n13/drop-admin-pat
Closed

Use GITHUB_TOKEN instead of ADMIN_PAT in release workflows#90
n13 wants to merge 1 commit into
mainfrom
n13/drop-admin-pat

Conversation

@n13

@n13 n13 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The release-proposal workflow failed at gh pr create with HTTP 401: Bad credentials (https://github.com/Quantus-Network/qp-zk-circuits/actions/runs/33382620939): the org secret ADMIN_PAT no longer authenticates. Nothing here needs a PAT, so this drops it:

  • gh pr create in the release-proposal workflow(s) and gh release create in the tag-and-publish workflow(s) now use the built-in github.token.
  • The proposal job gains pull-requests: write (it already had contents: write for the branch push); the publish job already has contents: write, which is all gh release create needs.

Two things to know:

  1. The repo setting Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" must be on, or gh pr create is refused. It is currently off on this repo. Equivalent API call:
    gh api -X PUT repos/Quantus-Network/<repo>/actions/permissions/workflow -f default_workflow_permissions=read -F can_approve_pull_request_reviews=true
  2. Pull requests opened with github.token do not trigger pull_request workflows, so the automated release PR will show no CI checks. The tag-and-publish workflow still runs format, build, clippy, doc and audit at the tag before anything is published, and no status checks are required by branch protection.

The org-level ADMIN_PAT stopped authenticating (HTTP 401 on gh pr create).
Creating the release PR and the GitHub release only needs the workflow
token with pull-requests: write and contents: write.
@n13

n13 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Closing: ADMIN_PAT was rotated instead; the org policy blocks Actions-created PRs and token-created PRs would not trigger CI.

@n13 n13 closed this Aug 31, 2026
@n13
n13 deleted the n13/drop-admin-pat branch August 31, 2026 11:12
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