What happens when you re-run a workflow: which attempts, tokens and code are used?
IntermediateConceptJobs, Steps, Matrix & Concurrency
Answer
A re-run creates a new attempt (github.run_attempt increments) of the same run, using the same commit SHA and the same workflow file version, and the original event payload. New GITHUB_TOKENs are minted. "Re-run failed jobs" re-runs failed jobs and their dependents only, reusing outputs from successful jobs. Environment approvals are required again. Secrets are read fresh, so a rotated secret takes effect on re-run, but a fixed workflow file does not: push a new commit for that.
More on Jobs, Steps, Matrix & Concurrency
How does `needs` work, and what happens to a job whose dependency failed or was skipped?BeginnerWhat is the implicit `success()` in a job `if`, and why is `always()` usually the wrong fix?IntermediateWhat values can `needs.<job>.result` take?BeginnerHow does a matrix expand, and how are job names generated?BeginnerHow do `include` and `exclude` work in a matrix?IntermediateWhat do `fail-fast` and `max-parallel` do?Beginner