mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-19 06:26:53 +08:00
Cache artifacts directory by default
This commit is contained in:
7
lib/setup-julia.js
generated
7
lib/setup-julia.js
generated
@@ -20,6 +20,7 @@ const exec = __importStar(require("@actions/exec"));
|
||||
const tc = __importStar(require("@actions/tool-cache"));
|
||||
const path = __importStar(require("path"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
const jlcache = __importStar(require("./caching"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
@@ -49,6 +50,12 @@ function run() {
|
||||
if (core.getInput('show-versioninfo') == 'true') {
|
||||
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
||||
}
|
||||
// Create caches
|
||||
if (core.getInput('cache-artifacts') == 'true') {
|
||||
core.debug('caching artifacts directory...');
|
||||
const cacheId = yield jlcache.cacheArtifacts();
|
||||
core.setOutput('artifacts-cache-id', cacheId.toString());
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
||||
Reference in New Issue
Block a user