mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-24 11:08:56 +08:00
Short-circuit dependencies and configuration caching if cache dir already exists
This is relevant if you run this action several times in a single job. This prevent doing unnecessary work starting with the second job using the action. This prevent droping dependencies downloaded by the first job using the action. This prevent Windows agents to fail unlinking already existing files.
This commit is contained in:
@@ -19,6 +19,7 @@ export async function restoreCachedConfiguration(
|
||||
if (isConfigurationCacheDisabled()) return
|
||||
|
||||
const cachePath = path.resolve(rootDir, '.gradle/configuration-cache')
|
||||
if (fs.existsSync(cachePath)) return
|
||||
core.saveState(CONFIGURATION_CACHE_PATH, cachePath)
|
||||
|
||||
const inputCacheExact = github.inputBoolean('configuration-cache-exact')
|
||||
|
||||
Reference in New Issue
Block a user