Skip to content

GitHub Actions Cache both present and not accessible? #25339

Answered by BrightRan
msfjarvis asked this question in Actions
Discussion options

You must be logged in to vote

@msfjarvis,

are caches not accessible to PRs from forks?

Sure, caches is available to PRs from forks. However, there are some restrictions for accessing a cache that you need to know.
According to the description below from the docs about cache:

With v2 of the cache action, you can access the cache in workflows triggered by any event that has a GITHUB_REF.

A workflow can access and restore a cache created in the current branch, the base branch (including base branches of forked repositories), or the default branch (usually master).

The cache created for a branch would not be accessible to its base branch and other branches which are not based on this branch.

Similarly, the cache cre…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants