When does a GITHUB_TOKEN expire?
Select an answer to reveal the explanation.
Short Explanation
GITHUB_TOKEN is tied to the job lifecycle — it's born when the job starts and dies when the job ends. You don't get a fixed clock like 1 hour, 8 hours, or 24 hours; it expires when the workflow job finishes.
Full Explanation
The GITHUB_TOKEN is created at the start of each workflow job and expires when that job completes, successfully or with failure. It does not persist across jobs; each job gets its own token. It is a GitHub App installation token with a lifespan set to the job duration, with a hard maximum of a few hours for very long-running jobs. This differs from personal access tokens, which have user-configurable expiration. After the job ends, it is immediately revoked, limiting compromise to the job run. The 8-hour expiry is wrong because the token is not fixed to 8 hours. The 24-hour expiry regardless of job status is wrong because it ends when the job finishes, not after a 24-hour window. The 1-hour expiry tied to a runner registration token is wrong because GITHUB_TOKEN is per job and not a runner registration token.