mirror of
https://github.com/actions/setup-go.git
synced 2025-04-24 01:50:52 +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
|
||||
cache-dependency-path:
|
||||
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:
|
||||
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
|
||||
outputs:
|
||||
|
|
3
dist/cache-save/index.js
vendored
3
dist/cache-save/index.js
vendored
|
@ -60363,7 +60363,8 @@ function run() {
|
|||
exports.run = run;
|
||||
const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const cacheInput = core.getBooleanInput('cache');
|
||||
if (!cacheInput) {
|
||||
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
|
||||
if (!cacheInput || cacheRestoreOnly) {
|
||||
return;
|
||||
}
|
||||
const packageManager = 'default';
|
||||
|
|
|
@ -29,7 +29,8 @@ export async function run() {
|
|||
|
||||
const cachePackages = async () => {
|
||||
const cacheInput = core.getBooleanInput('cache');
|
||||
if (!cacheInput) {
|
||||
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
|
||||
if (!cacheInput || cacheRestoreOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue