This commit is contained in:
Salman Chishti 2026-07-14 23:18:02 -04:00 • committed by GitHub
commit 93c5201c99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 0 deletions

View file

@ -9,6 +9,14 @@ import {State} from './cache-distributions/cache-distributor';
// https://github.com/actions/cache/pull/1217
export async function run(earlyExit?: boolean) {
try {
const cacheWriteEnabled = core.getInput('cache-write');
if (cacheWriteEnabled === 'false') {
core.info(
'Cache write is disabled (read-only mode). Skipping cache save.'
);
return;
}
const cache = core.getInput('cache');
if (cache) {
await saveCache(cache);