Update cache/action.yaml

This commit is contained in:
Zakary Timson 2023-08-07 03:00:36 +00:00
parent 7beba24ae5
commit 9015965d07

6
cache/action.yaml vendored
View File

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