Use monolithic cache for Gradle User Home

- Do not restore cache when GUH exists
- Include RUNNER_OS in the cache key
- Do not save cache on exact hit
- Only save cache in the final post action
- Log before saving cache
This commit is contained in:
Daz DeBoer 2021-08-22 20:14:47 -06:00
parent b3afdc78a7
commit c211be411e
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
7 changed files with 247 additions and 22 deletions

View file

@ -1,16 +1,12 @@
import * as core from '@actions/core'
import * as cacheWrapper from './cache-wrapper'
import * as cacheDependencies from './cache-dependencies'
import * as cacheConfiguration from './cache-configuration'
import * as cacheGradleUserHome from './cache-gradle-user-home'
// Invoked by GitHub Actions
export async function run(): Promise<void> {
if (isCacheReadOnly()) return
await cacheWrapper.cacheWrapperDist()
await cacheDependencies.cacheDependencies()
await cacheConfiguration.cacheConfiguration()
await cacheGradleUserHome.save()
}
function isCacheReadOnly(): boolean {