mirror of
https://gitea.com/actions/cache.git
synced 2026-01-21 06:44:29 +07:00
Fix save-always/post-if with an output
This commit is contained in:
@@ -5,13 +5,15 @@ export enum Inputs {
|
||||
UploadChunkSize = "upload-chunk-size", // Input for cache, save action
|
||||
EnableCrossOsArchive = "enableCrossOsArchive", // Input for cache, restore, save action
|
||||
FailOnCacheMiss = "fail-on-cache-miss", // Input for cache, restore action
|
||||
LookupOnly = "lookup-only" // Input for cache, restore action
|
||||
LookupOnly = "lookup-only", // Input for cache, restore action
|
||||
SaveAlways = "save-always" // Input for cache action
|
||||
}
|
||||
|
||||
export enum Outputs {
|
||||
CacheHit = "cache-hit", // Output from cache, restore action
|
||||
CachePrimaryKey = "cache-primary-key", // Output from restore action
|
||||
CacheMatchedKey = "cache-matched-key" // Output from restore action
|
||||
CacheMatchedKey = "cache-matched-key", // Output from restore action
|
||||
SaveAlways = "save-always-d18d746b9" // Output from cache action, with unique suffix for detection in post-if
|
||||
}
|
||||
|
||||
export enum State {
|
||||
|
||||
@@ -12,6 +12,8 @@ import * as utils from "./utils/actionUtils";
|
||||
export async function restoreImpl(
|
||||
stateProvider: IStateProvider
|
||||
): Promise<string | undefined> {
|
||||
core.setOutput(Outputs.SaveAlways, core.getInput(Inputs.SaveAlways));
|
||||
|
||||
try {
|
||||
if (!utils.isCacheFeatureAvailable()) {
|
||||
core.setOutput(Outputs.CacheHit, "false");
|
||||
|
||||
Reference in New Issue
Block a user