Update cache/action.yaml

This commit is contained in:
Zakary Timson 2023-08-07 13:34:28 +00:00
parent 8f18d935a6
commit 74fef087fb

6
cache/action.yaml vendored
View File

@ -18,8 +18,6 @@ runs:
- /mnt/swarm/gitea/runner/cache:/cache - /mnt/swarm/gitea/runner/cache:/cache
steps: steps:
- run: | - run: |
tar -czf "archive.tar.gz" ${{ inputs.pattern }}
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}" mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
ARCHIVE="/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
[[ ! -f "$ARCHIVE" || "$(md5sum "$ARCHIVE")" != "$(md5sum archive.tar.gz)" ]] && mv archive.tar.gz "$ARCHIVE" echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
echo "Created cache: $ARCHIVE"