Cache artifacts directory by default

This commit is contained in:
Sascha Mann
2020-06-25 13:39:22 +02:00
parent 8945494c8c
commit ead3831d7a
7 changed files with 167 additions and 7 deletions

View File

@@ -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)
}