mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02:00
Add support for read-only caching in v2
This commit is contained in:
parent
d9cc0aeccf
commit
6fca6b3929
6 changed files with 53 additions and 35 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue