diff --git a/cache/restore/action.yaml b/cache/restore/action.yaml index f2808c7..6eb76d2 100644 --- a/cache/restore/action.yaml +++ b/cache/restore/action.yaml @@ -15,6 +15,7 @@ runs: - /mnt/swarm/gitea/runner/cache:/cache steps: - run: | - mv "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" . || echo "Cache not found" && exit + [ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit + mv "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" . tar -xzf "archive.tar.gz" echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"