mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
add save-always
This commit is contained in:
@@ -36,6 +36,9 @@ inputs:
|
||||
cache-logs:
|
||||
description: Whether to cache the depot's `logs` directory. This helps automatic `Pkg.gc()` keep the cache size down.
|
||||
default: 'true'
|
||||
save-always:
|
||||
description: Whether to save the cache even when the job fails. This is useful as the julia depot should mostly be reusable from a failing job.
|
||||
default: 'true'
|
||||
delete-old-caches:
|
||||
description: Whether to delete old caches for the given key.
|
||||
default: 'true'
|
||||
@@ -52,7 +55,7 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Install jq
|
||||
uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb
|
||||
uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb # v2.1.0
|
||||
with:
|
||||
force: false # Skip install when an existing `jq` is present
|
||||
|
||||
@@ -115,7 +118,7 @@ runs:
|
||||
env:
|
||||
MATRIX_JSON: ${{ toJSON(matrix) }}
|
||||
|
||||
- uses: actions/cache@4d4ae6ae148a43d0fd1eda1800170683e9882738
|
||||
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
@@ -123,6 +126,7 @@ runs:
|
||||
key: ${{ steps.keys.outputs.key }}
|
||||
restore-keys: ${{ steps.keys.outputs.restore-key }}
|
||||
enableCrossOsArchive: false
|
||||
save-always: ${{ inputs.save-always }}
|
||||
|
||||
# if it wasn't restored make the depot anyway as a signal that this action ran
|
||||
# for other julia actions to check, like https://github.com/julia-actions/julia-buildpkg/pull/41
|
||||
|
||||
Reference in New Issue
Block a user