Skip to content
joinery / docs

Provisioning the repo secrets

374 words · updated 6 hours agodocs/guides/repo-secrets.md

🔑 Provisioning the repo secrets

Five GitHub Actions secrets nothing in the repo provisions. A missing one rarely names itself, so read the symptom column first.

The secrets

SecretUsed byTokenSymptom when missing
PROJECTS_TOKENpr-metadata.ymlClassic PAT, repo + projectThe workflow fails on the first PR with gh's "set the GH_TOKEN environment variable" error
NX_CLOUD_ACCESS_TOKENci.yml nx affected stepNx Cloud access token, Read & WriteNothing fails: nx affected runs everything locally with no remote cache
RELEASE_TOKENrelease.yml push of the release commit and tagsClassic PAT, repo, on an account in the master ruleset's bypass listThe release commit and tags build, then nx release's push is rejected with "Changes must be made through a pull request" and no GitHub Release is created
NETLIFY_AUTH_TOKENdeploy-huella-legal.ymlNetlify personal access token, on an account with deploy rights on the Huella Legal projectA push to master fails at the Netlify CLI steps without deploying, and every PR passes with a "no Netlify token" notice instead of a preview
COPILOT_GITHUB_TOKENpr-docs-review.ymlFine-grained PAT, account permission Copilot RequestsThe advisory review is skipped; it is not a required check

Set each with (reads the value from stdin, so it stays out of shell history):

gh secret set <NAME> --repo <owner>/<repo>

Then re-run the failed workflow run.

Notes per token

SecretNote
PROJECTS_TOKENGITHUB_TOKEN never has the project scope Projects v2 needs. Classic token
NX_CLOUD_ACCESS_TOKENFrom the workspace's Nx Cloud page. Read & Write, or CI never populates the cache
RELEASE_TOKENMust belong to an account on the master ruleset's bypass list (an admin today)
NETLIFY_AUTH_TOKENNetlify → User settings → Applications → Personal access tokens. Set an expiry and rotate before it. NETLIFY_SITE_ID is a repo variable
COPILOT_GITHUB_TOKENFine-grained token, the owner's personal account as resource owner, Copilot Requests account permission. Spends the owner's Copilot credits