Update cache availability checks to include S3 save capability in restore and save implementations

pull/1662/head
Nate O'Farrell 2025-10-03 16:02:41 -04:00
parent 3a15256b35
commit 26cf033594
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export async function restoreImpl(
earlyExit?: boolean | undefined earlyExit?: boolean | undefined
): Promise<string | undefined> { ): Promise<string | undefined> {
try { try {
if (!utils.isCacheFeatureAvailable()) { if (!canSaveToS3 && !utils.isCacheFeatureAvailable()) {
core.setOutput(Outputs.CacheHit, "false"); core.setOutput(Outputs.CacheHit, "false");
return; return;
} }

View File

@ -22,7 +22,7 @@ export async function saveImpl(
): Promise<number | void> { ): Promise<number | void> {
let cacheId = -1; let cacheId = -1;
try { try {
if (!utils.isCacheFeatureAvailable()) { if (!canSaveToS3 && !utils.isCacheFeatureAvailable()) {
return; return;
} }