mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-24 08:56:53 +08:00
Cache artifacts directory by default
This commit is contained in:
@@ -5,6 +5,7 @@ import * as tc from '@actions/tool-cache'
|
||||
import * as path from 'path'
|
||||
|
||||
import * as installer from './installer'
|
||||
import * as jlcache from './caching'
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
@@ -39,6 +40,13 @@ async 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 = await jlcache.cacheArtifacts()
|
||||
core.setOutput('artifacts-cache-id', cacheId.toString())
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user