This option can be used to disable preservation of the global Zig cache directory across runs. This option is only applicable in rare cases, and should not be used by the majority of users.
19 lines
480 B
JavaScript
19 lines
480 B
JavaScript
const core = require('@actions/core');
|
|
const github = require('@actions/github');
|
|
const cache = require('@actions/cache');
|
|
const common = require('./common');
|
|
|
|
async function main() {
|
|
try {
|
|
if (core.getBooleanInput('use-cache')) {
|
|
const prefix = await common.getCachePrefix();
|
|
const name = prefix + github.context.runId;
|
|
await cache.saveCache([await common.getZigCachePath()], name);
|
|
}
|
|
} catch (err) {
|
|
core.setFailed(err.message);
|
|
}
|
|
}
|
|
|
|
main();
|