mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-11-06 03:09:06 +08:00
Ensure save/restore only on first action step
Instead of relying on the separate cache implementations to check for the existence of cached products, we now explicitly track whether or not the execution is the first time the action has been invoked for a job.
This commit is contained in:
@@ -294,12 +294,6 @@ export class GradleUserHomeCache extends AbstractCache {
|
||||
return path.resolve(os.homedir(), '.gradle')
|
||||
}
|
||||
|
||||
protected cacheOutputExists(): boolean {
|
||||
// Need to check for 'caches' directory to avoid incorrect detection on MacOS agents
|
||||
const dir = path.resolve(this.gradleUserHome, 'caches')
|
||||
return fs.existsSync(dir)
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the paths within Gradle User Home to cache.
|
||||
* By default, this is the 'caches' and 'notifications' directories,
|
||||
|
||||
Reference in New Issue
Block a user