Which branches can access caches created in a GitHub Actions workflow?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Cache access follows branch scope: your branch hits your caches first, then falls back to the default branch cache. No cross-org sharing.
Full explanation below image
Full Explanation
GitHub Actions cache access follows a scoping hierarchy: (1) Caches are scoped to the repository — no cross-repo or cross-org sharing; (2) A workflow run can access caches from its own branch OR from the base branch (usually main/master) OR from the default branch; (3) PRs can access caches from the base branch; (4) Caches created on the default branch are accessible to all branches. This means feature branches benefit from warm caches created on main, which typically has the most recent clean cache. Fork PRs cannot access caches from the parent repository for security reasons.