mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](a7c34adf76...fd5de65bc8)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: 'Cache Julia artifacts, packages and registry'
|
|
description: 'Cache Julia using actions/cache'
|
|
author: 'Sascha Mann, Rik Huijzer, and contributors'
|
|
|
|
branding:
|
|
icon: 'archive'
|
|
color: 'purple'
|
|
|
|
inputs:
|
|
cache-name:
|
|
description: 'Name used as part of the cache keys'
|
|
default: 'julia-cache'
|
|
cache-artifacts:
|
|
description: 'Whether to cache ~/.julia/artifacts/'
|
|
default: 'true'
|
|
cache-packages:
|
|
description: 'Whether to cache ~/.julia/packages/'
|
|
default: 'true'
|
|
cache-registries:
|
|
description: 'Whether to cache ~/.julia/registries/'
|
|
default: 'false'
|
|
|
|
outputs:
|
|
cache-hit:
|
|
description: 'A boolean value to indicate an exact match was found for the primary key. Returns \"\" when the key is new. Forwarded from actions/cache'
|
|
value: ${{ steps.hit.outputs.cache-hit }}
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- id: paths
|
|
run: |
|
|
[ "${{ inputs.cache-artifacts }}" = "true" ] && A_PATH="~/.julia/artifacts"
|
|
echo "ARTIFACTS_PATH=$A_PATH" >> $GITHUB_ENV
|
|
[ "${{ inputs.cache-packages }}" = "true" ] && P_PATH="~/.julia/packages"
|
|
echo "PACKAGES_PATH=$P_PATH" >> $GITHUB_ENV
|
|
[ "${{ inputs.cache-registries }}" = "true" ] && R_PATH="~/.julia/registries"
|
|
echo "REGISTRIES_PATH=$R_PATH" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
|
|
id: cache
|
|
with:
|
|
path: "${{ format('{0}\n{1}\n{2}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH) }}"
|
|
key: ${{ runner.os }}-test-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-test-${{ inputs.cache-name }}-
|
|
|
|
- id: hit
|
|
run: echo "::set-output name=cache-hit::$(echo $CACHE_HIT)"
|
|
env:
|
|
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
|
|
shell: bash
|