2021-08-17 16:15:28 -06:00
|
|
|
import * as core from '@actions/core'
|
|
|
|
|
2021-08-22 20:14:47 -06:00
|
|
|
import * as cacheGradleUserHome from './cache-gradle-user-home'
|
2020-06-13 13:34:07 +02:00
|
|
|
|
|
|
|
// Invoked by GitHub Actions
|
2020-06-13 13:54:27 +02:00
|
|
|
export async function run(): Promise<void> {
|
2021-08-17 16:15:28 -06:00
|
|
|
if (isCacheReadOnly()) return
|
|
|
|
|
2021-08-22 20:14:47 -06:00
|
|
|
await cacheGradleUserHome.save()
|
2020-06-13 13:34:07 +02:00
|
|
|
}
|
|
|
|
|
2021-08-17 16:15:28 -06:00
|
|
|
function isCacheReadOnly(): boolean {
|
|
|
|
return core.getBooleanInput('cache-read-only')
|
|
|
|
}
|
|
|
|
|
2020-06-13 13:44:30 +02:00
|
|
|
run()
|