Add support for read-only caching in v2

This commit is contained in:
Daz DeBoer 2021-08-24 12:57:17 -06:00
parent d9cc0aeccf
commit 6fca6b3929
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
6 changed files with 53 additions and 35 deletions

View file

@ -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()