When does a GITHUB_TOKEN expire?
Select an answer to reveal the explanation.
Short Explanation and Infographic
GITHUB_TOKEN is tied to the job lifecycle — it's born when the job starts and dies when the job ends.
Full explanation below image
Full Explanation
The GITHUB_TOKEN is automatically created at the start of each workflow job and expires when the job completes (either successfully or with failure). It does not persist across jobs — each job gets its own token. The token is a GitHub App installation token with a maximum lifespan set to the job duration, with a hard maximum of a few hours for very long-running jobs. This is different from personal access tokens (PATs) which have user-configurable expiration. After the job ends, the token is immediately revoked. This short-lived nature is a security feature — compromise of the token can only be exploited during the job run.