mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 17:36:53 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8608484607 | ||
|
|
e662c42397 |
@@ -66,6 +66,7 @@ runs:
|
||||
else
|
||||
depot="~/.julia"
|
||||
fi
|
||||
depot="${depot/#\~/$HOME}" # Expand tilde which cannot be used in BASH checks (i.e. `[ -d "~/.julia" ]` fails)
|
||||
echo "depot=$depot" | tee -a "$GITHUB_OUTPUT"
|
||||
|
||||
cache_paths=()
|
||||
@@ -75,7 +76,7 @@ runs:
|
||||
[ "${{ inputs.cache-packages }}" = "true" ] && cache_paths+=("$packages_path")
|
||||
registries_path="${depot}/registries"
|
||||
if [ "${{ inputs.cache-registries }}" = "true" ]; then
|
||||
if [ ! -d "${registries_path/#\~/$HOME}" ]; then
|
||||
if [ ! -d "${registries_path}" ]; then
|
||||
cache_paths+=("$registries_path")
|
||||
else
|
||||
echo "::warning::Julia depot registries already exist. Skipping restoring of cached registries to avoid potential merge conflicts when updating. Please ensure that \`julia-actions/cache\` precedes any workflow steps which add registries."
|
||||
@@ -139,6 +140,7 @@ runs:
|
||||
# Pkg operations. So this is only necessary for newer julia versions.
|
||||
- name: Update any cached registries
|
||||
if: ${{ inputs.cache-registries == 'true' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [ -d "${{ steps.paths.outputs.depot }}/registries" ] && [ -n "$(ls -A "${{ steps.paths.outputs.depot }}/registries")" ]; then
|
||||
echo "Registries directory exists and is non-empty. Updating any registries"
|
||||
|
||||
Reference in New Issue
Block a user