Compare commits

..

4 Commits

Author SHA1 Message Date
Lovepreet Singh
18103f63fe Fix licensed status error 2022-10-13 11:03:20 +00:00
Lovepreet Singh
3e383cd9c3 Update RELEASES 2022-10-13 10:36:33 +00:00
Lovepreet Singh
43428ea056 toolkit versioon update and version bump for cache 2022-10-13 10:34:22 +00:00
Lovepreet Singh
1c73980b09 3.0.11 2022-10-13 09:02:55 +00:00
10 changed files with 23 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/cache" name: "@actions/cache"
version: 3.0.4 version: 3.0.5
type: npm type: npm
summary: summary:
homepage: homepage:

View File

@@ -36,7 +36,6 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
* `key` - An explicit key for restoring and saving the cache * `key` - An explicit key for restoring and saving the cache
* `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key. Note * `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key. Note
`cache-hit` returns false in this case. `cache-hit` returns false in this case.
* `reeval-key` - A boolean which causes the key to be re-evaluated during the Post-Action step
#### Environment Variables #### Environment Variables
* `SEGMENT_DOWNLOAD_TIMEOUT_MIN` - Segment download timeout (in minutes, default `60`) to abort download of the segment if not completed in the defined number of minutes. [Read more](#cache-segment-restore-timeout) * `SEGMENT_DOWNLOAD_TIMEOUT_MIN` - Segment download timeout (in minutes, default `60`) to abort download of the segment if not completed in the defined number of minutes. [Read more](#cache-segment-restore-timeout)

View File

@@ -36,3 +36,7 @@
### 3.0.10 ### 3.0.10
- Fix a bug with sorting inputs. - Fix a bug with sorting inputs.
- Update definition for restore-keys in README.md - Update definition for restore-keys in README.md
### 3.0.11
- Update toolkit version to 3.0.5 to include `@actions/core@^1.10.0`
- Update `@actions/cache` to use updated `saveState` and `setOutput` functions from `@actions/core@^1.10.0`

View File

@@ -14,10 +14,6 @@ inputs:
upload-chunk-size: upload-chunk-size:
description: 'The chunk size used to split up large files during upload, in bytes' description: 'The chunk size used to split up large files during upload, in bytes'
required: false required: false
reeval-key:
description: 'Re-evaluate the cache key during the post-action'
required: false
default: false
outputs: outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key' description: 'A boolean value to indicate an exact match was found for the primary key'

View File

@@ -4947,7 +4947,6 @@ var Inputs;
Inputs["Path"] = "path"; Inputs["Path"] = "path";
Inputs["RestoreKeys"] = "restore-keys"; Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size"; Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["ReEvalKey"] = "reeval-key";
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {

6
dist/save/index.js vendored
View File

@@ -4947,7 +4947,6 @@ var Inputs;
Inputs["Path"] = "path"; Inputs["Path"] = "path";
Inputs["RestoreKeys"] = "restore-keys"; Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size"; Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["ReEvalKey"] = "reeval-key";
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {
@@ -47298,9 +47297,8 @@ function run() {
return; return;
} }
const state = utils.getCacheState(); const state = utils.getCacheState();
const primaryKey = core.getBooleanInput(constants_1.Inputs.ReEvalKey) // Inputs are re-evaluted before the post action, so we want the original key used for restore
? core.getInput(constants_1.Inputs.Key, { required: true }) const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
: core.getState(constants_1.State.CachePrimaryKey);
if (!primaryKey) { if (!primaryKey) {
utils.logWarning(`Error retrieving key from state.`); utils.logWarning(`Error retrieving key from state.`);
return; return;

22
package-lock.json generated
View File

@@ -1,15 +1,15 @@
{ {
"name": "cache", "name": "cache",
"version": "3.0.10", "version": "3.0.11",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "cache", "name": "cache",
"version": "3.0.10", "version": "3.0.11",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^3.0.4", "@actions/cache": "^3.0.5",
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2" "@actions/io": "^1.1.2"
@@ -36,11 +36,11 @@
} }
}, },
"node_modules/@actions/cache": { "node_modules/@actions/cache": {
"version": "3.0.4", "version": "3.0.5",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.4.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.5.tgz",
"integrity": "sha512-9RwVL8/ISJoYWFNH1wR/C26E+M3HDkGPWmbFJMMCKwTkjbNZJreMT4XaR/EB1bheIvN4PREQxEQQVJ18IPnf/Q==", "integrity": "sha512-0WpPmwnRPkn5k5ASmjoX8bY8NrZEPTwN+64nGYJmR/bHjEVgC8svdf5K956wi67tNJBGJky2+UfvNbUOtHmMHg==",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.6", "@actions/core": "^1.10.0",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0", "@actions/glob": "^0.1.0",
"@actions/http-client": "^2.0.1", "@actions/http-client": "^2.0.1",
@@ -9534,11 +9534,11 @@
}, },
"dependencies": { "dependencies": {
"@actions/cache": { "@actions/cache": {
"version": "3.0.4", "version": "3.0.5",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.4.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.5.tgz",
"integrity": "sha512-9RwVL8/ISJoYWFNH1wR/C26E+M3HDkGPWmbFJMMCKwTkjbNZJreMT4XaR/EB1bheIvN4PREQxEQQVJ18IPnf/Q==", "integrity": "sha512-0WpPmwnRPkn5k5ASmjoX8bY8NrZEPTwN+64nGYJmR/bHjEVgC8svdf5K956wi67tNJBGJky2+UfvNbUOtHmMHg==",
"requires": { "requires": {
"@actions/core": "^1.2.6", "@actions/core": "^1.10.0",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0", "@actions/glob": "^0.1.0",
"@actions/http-client": "^2.0.1", "@actions/http-client": "^2.0.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache",
"version": "3.0.10", "version": "3.0.11",
"private": true, "private": true,
"description": "Cache dependencies and build outputs", "description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js", "main": "dist/restore/index.js",
@@ -23,7 +23,7 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^3.0.4", "@actions/cache": "^3.0.5",
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2" "@actions/io": "^1.1.2"

View File

@@ -2,8 +2,7 @@ export enum Inputs {
Key = "key", Key = "key",
Path = "path", Path = "path",
RestoreKeys = "restore-keys", RestoreKeys = "restore-keys",
UploadChunkSize = "upload-chunk-size", UploadChunkSize = "upload-chunk-size"
ReEvalKey = "reeval-key"
} }
export enum Outputs { export enum Outputs {

View File

@@ -26,9 +26,8 @@ async function run(): Promise<void> {
const state = utils.getCacheState(); const state = utils.getCacheState();
const primaryKey = core.getBooleanInput(Inputs.ReEvalKey) // Inputs are re-evaluted before the post action, so we want the original key used for restore
? core.getInput(Inputs.Key, { required: true }) const primaryKey = core.getState(State.CachePrimaryKey);
: core.getState(State.CachePrimaryKey);
if (!primaryKey) { if (!primaryKey) {
utils.logWarning(`Error retrieving key from state.`); utils.logWarning(`Error retrieving key from state.`);
return; return;