Understand token scoping and target selection
mainThe scope of the generated token is determined by the combination of inputs provided. The action uses the POST /app/installations/{installation_id}/access_tokens endpoint to create the token.
| Input Combination | Token Scope |
|---|---|
enterprise is set | Scoped to an enterprise installation (can call enterprise APIs, but no org/repo access) |
owner is set, repositories is empty | All repositories in the provided owner's installation |
repositories is set | Only the specified repositories |
No target inputs (owner, repositories, or enterprise) | Only the current repository |
Important Lifecycle Note: Unless skip-token-revoke is set to true, the token is revoked at the end of the job. This means you cannot pass the token to a different job via outputs unless you disable revocation.