mirror of
https://github.com/actions/cache.git
synced 2024-11-21 17:31:27 +01:00
adding outputs
This commit is contained in:
parent
66ef8a0951
commit
a5fbe79711
6 changed files with 19 additions and 2 deletions
2
dist/restore/index.js
vendored
2
dist/restore/index.js
vendored
|
@ -47582,6 +47582,8 @@ var Inputs;
|
|||
var Outputs;
|
||||
(function (Outputs) {
|
||||
Outputs["CacheHit"] = "cache-hit";
|
||||
Outputs["Key"] = "key";
|
||||
Outputs["MatchedKey"] = "matched-key";
|
||||
})(Outputs = exports.Outputs || (exports.Outputs = {}));
|
||||
var State;
|
||||
(function (State) {
|
||||
|
|
2
dist/save/index.js
vendored
2
dist/save/index.js
vendored
|
@ -4975,6 +4975,8 @@ var Inputs;
|
|||
var Outputs;
|
||||
(function (Outputs) {
|
||||
Outputs["CacheHit"] = "cache-hit";
|
||||
Outputs["Key"] = "key";
|
||||
Outputs["MatchedKey"] = "matched-key";
|
||||
})(Outputs = exports.Outputs || (exports.Outputs = {}));
|
||||
var State;
|
||||
(function (State) {
|
||||
|
|
|
@ -14,6 +14,12 @@ inputs:
|
|||
outputs:
|
||||
cache-hit:
|
||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||
key:
|
||||
description: 'Key passed in the input to use in subsequent steps of the workflow'
|
||||
required: true
|
||||
matched-key:
|
||||
description: 'Cache key restored'
|
||||
required: true
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: '../dist/restore/index.js'
|
||||
|
|
|
@ -11,6 +11,9 @@ inputs:
|
|||
upload-chunk-size:
|
||||
description: 'The chunk size used to split up large files during upload, in bytes'
|
||||
required: false
|
||||
matched-key:
|
||||
description: 'Cache key restored from the restore action'
|
||||
required: false
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: '../dist/save/index.js'
|
||||
|
|
|
@ -6,7 +6,9 @@ export enum Inputs {
|
|||
}
|
||||
|
||||
export enum Outputs {
|
||||
CacheHit = "cache-hit"
|
||||
CacheHit = "cache-hit",
|
||||
Key = "key",
|
||||
MatchedKey = "matched-key"
|
||||
}
|
||||
|
||||
export enum State {
|
||||
|
|
|
@ -5,7 +5,9 @@ import { Events, Inputs, Outputs, State } from "./constants";
|
|||
import { IStateProvider } from "./stateProvider";
|
||||
import * as utils from "./utils/actionUtils";
|
||||
|
||||
async function restoreImpl(stateProvider: IStateProvider): Promise<string | undefined> {
|
||||
async function restoreImpl(
|
||||
stateProvider: IStateProvider
|
||||
): Promise<string | undefined> {
|
||||
try {
|
||||
if (!utils.isCacheFeatureAvailable()) {
|
||||
utils.setCacheHitOutput(false);
|
||||
|
|
Loading…
Reference in a new issue