From 0ecbac99f3d278cb5a243f8dbed0834b23ded246 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Fri, 3 Sep 2021 11:25:55 -0600 Subject: [PATCH] Group log messsages for restore/save cache --- src/caches.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/caches.ts b/src/caches.ts index 0164168..4b33a5e 100644 --- a/src/caches.ts +++ b/src/caches.ts @@ -5,15 +5,23 @@ import * as core from '@actions/core' const BUILD_ROOT_DIR = 'BUILD_ROOT_DIR' export async function restore(buildRootDirectory: string): Promise { - 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 { - 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() }