Caching on GHES by tiwarishub · Pull Request #308 · actions/setup-java (original) (raw)

Description:
This PR adds caching support in setup-java for GHES with version 3.5. It checks the presence of the Actions cache service(which is used for caching dependencies in GHES and dotcom) using the recent @actions/cache toolkit package function i.e isFeatureAvailable. This same function can be applied to dotcom scenario (github.com) so this function can be safely applied to dotcom scenario as well.
I have tested the below scenarios
on GHES
Current behaviour
image

With new changes. Without AC on GHES
image

With AC on GHES
save
image
restore
image

without choosing the cache option on GHES with AC
image

On dotcom

save
image

cache hit
image

without cache option
image

Related issue:
#307

Check list: