mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02: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:
parent
b3afdc78a7
commit
c211be411e
7 changed files with 247 additions and 22 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue