mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-21 08:38:56 +08:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user