Update cache/action.yaml

This commit is contained in:
Zakary Timson 2023-08-07 02:56:45 +00:00
parent 7096d3b52b
commit f8819a45d5

6
cache/action.yaml vendored
View File

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