mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-20 15:18:56 +08:00
Add support for read-only caching in v2
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
import * as core from '@actions/core'
|
||||
|
||||
import * as caches from './caches'
|
||||
|
||||
// Invoked by GitHub Actions
|
||||
export async function run(): Promise<void> {
|
||||
if (isCacheReadOnly()) return
|
||||
|
||||
await caches.save()
|
||||
}
|
||||
|
||||
function isCacheReadOnly(): boolean {
|
||||
return core.getBooleanInput('cache-read-only')
|
||||
}
|
||||
|
||||
run()
|
||||
|
Reference in New Issue
Block a user