Always initialize encryption key

This commit is contained in:
daz
2024-01-02 14:28:29 -07:00
parent c00a847f3f
commit 270f30ba56
7 changed files with 20 additions and 27 deletions

View File

@@ -26,6 +26,7 @@ export class GradleStateCache {
}
init(): void {
// Copy init-scripts to Gradle User Home
const actionCacheDir = path.resolve(this.gradleUserHome, '.gradle-build-action')
fs.mkdirSync(actionCacheDir, {recursive: true})
@@ -33,6 +34,12 @@ export class GradleStateCache {
fs.mkdirSync(initScriptsDir, {recursive: true})
this.initializeGradleUserHome(this.gradleUserHome, initScriptsDir)
// Export the GRADLE_ENCRYPTION_KEY variable if provided
const encryptionKey = params.getCacheEncryptionKey()
if (encryptionKey) {
core.exportVariable('GRADLE_ENCRYPTION_KEY', encryptionKey)
}
}
cacheOutputExists(): boolean {