Add cache for project .gradle dir

- For now, this is limited to configuration-cache directory
This commit is contained in:
Daz DeBoer
2021-08-20 13:01:43 -06:00
parent c211be411e
commit 5340f6e816
6 changed files with 144 additions and 12 deletions

View File

@@ -2,19 +2,19 @@ import * as core from '@actions/core'
import * as path from 'path'
import {parseArgsStringToArgv} from 'string-argv'
import * as cacheGradleUserHome from './cache-gradle-user-home'
import * as caches from './caches'
import * as execution from './execution'
import * as gradlew from './gradlew'
import * as provision from './provision'
// Invoked by GitHub Actions
export async function run(): Promise<void> {
await cacheGradleUserHome.restore()
const workspaceDirectory = process.env[`GITHUB_WORKSPACE`] || ''
const buildRootDirectory = resolveBuildRootDirectory(workspaceDirectory)
await caches.restore(buildRootDirectory)
try {
const workspaceDirectory = process.env[`GITHUB_WORKSPACE`] || ''
const buildRootDirectory = resolveBuildRootDirectory(workspaceDirectory)
const result = await execution.execute(
await resolveGradleExecutable(
workspaceDirectory,