mirror of
https://github.com/actions/setup-go.git
synced 2025-04-24 09:52:15 +00:00
Add cache-restore-only input
This commit is contained in:
parent
41c2024c46
commit
aef6ecca6c
3 changed files with 7 additions and 2 deletions
|
@ -17,6 +17,9 @@ inputs:
|
||||||
default: true
|
default: true
|
||||||
cache-dependency-path:
|
cache-dependency-path:
|
||||||
description: 'Used to specify the path to a dependency file - go.sum'
|
description: 'Used to specify the path to a dependency file - go.sum'
|
||||||
|
cache-restore-only:
|
||||||
|
description: 'Set this option to true if you do not want to modify the cache from the previous build'
|
||||||
|
default: false
|
||||||
architecture:
|
architecture:
|
||||||
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
|
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
|
||||||
outputs:
|
outputs:
|
||||||
|
|
3
dist/cache-save/index.js
vendored
3
dist/cache-save/index.js
vendored
|
@ -60363,7 +60363,8 @@ function run() {
|
||||||
exports.run = run;
|
exports.run = run;
|
||||||
const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
|
const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const cacheInput = core.getBooleanInput('cache');
|
const cacheInput = core.getBooleanInput('cache');
|
||||||
if (!cacheInput) {
|
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
|
||||||
|
if (!cacheInput || cacheRestoreOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const packageManager = 'default';
|
const packageManager = 'default';
|
||||||
|
|
|
@ -29,7 +29,8 @@ export async function run() {
|
||||||
|
|
||||||
const cachePackages = async () => {
|
const cachePackages = async () => {
|
||||||
const cacheInput = core.getBooleanInput('cache');
|
const cacheInput = core.getBooleanInput('cache');
|
||||||
if (!cacheInput) {
|
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
|
||||||
|
if (!cacheInput || cacheRestoreOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue