mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
Change behavior of the post-job
If caching is not enabled by action.yml input, save of the cache won't occur in the post-job.
This commit is contained in:
parent
766a3397b4
commit
8dd60badf6
2 changed files with 7 additions and 0 deletions
3
dist/cache-save/index.js
vendored
3
dist/cache-save/index.js
vendored
|
@ -46368,6 +46368,9 @@ 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 cachingFlag = core.getInput('cache');
|
||||||
|
if (!cachingFlag)
|
||||||
|
return;
|
||||||
const state = core.getState(constants_1.State.CacheMatchedKey);
|
const state = core.getState(constants_1.State.CacheMatchedKey);
|
||||||
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
|
||||||
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo();
|
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo();
|
||||||
|
|
|
@ -21,6 +21,10 @@ export async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const cachePackages = async () => {
|
const cachePackages = async () => {
|
||||||
|
|
||||||
|
const cachingFlag = core.getInput('cache');
|
||||||
|
if (!cachingFlag) return;
|
||||||
|
|
||||||
const state = core.getState(State.CacheMatchedKey);
|
const state = core.getState(State.CacheMatchedKey);
|
||||||
const primaryKey = core.getState(State.CachePrimaryKey);
|
const primaryKey = core.getState(State.CachePrimaryKey);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue