mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-28 19:20:55 -05:00
Group log messsages for restore/save cache
This commit is contained in:
parent
436390bd4e
commit
0ecbac99f3
1 changed files with 12 additions and 4 deletions
|
@ -5,15 +5,23 @@ import * as core from '@actions/core'
|
|||
const BUILD_ROOT_DIR = 'BUILD_ROOT_DIR'
|
||||
|
||||
export async function restore(buildRootDirectory: string): Promise<void> {
|
||||
core.saveState(BUILD_ROOT_DIR, buildRootDirectory)
|
||||
|
||||
core.startGroup('Restore Gradle User Home from cache')
|
||||
await cacheGradleUserHome.restore()
|
||||
core.endGroup()
|
||||
|
||||
core.startGroup('Restore project .gradle directory from cache')
|
||||
core.saveState(BUILD_ROOT_DIR, buildRootDirectory)
|
||||
await cacheProjectDotGradle.restore(buildRootDirectory)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
export async function save(): Promise<void> {
|
||||
const buildRootDirectory = core.getState(BUILD_ROOT_DIR)
|
||||
|
||||
core.startGroup('Cache Gradle User Home')
|
||||
await cacheGradleUserHome.save()
|
||||
core.endGroup()
|
||||
|
||||
core.startGroup('Cache project .gradle directory')
|
||||
const buildRootDirectory = core.getState(BUILD_ROOT_DIR)
|
||||
await cacheProjectDotGradle.save(buildRootDirectory)
|
||||
core.endGroup()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue