actions/cache/restore/action.yaml

21 lines
495 B
YAML

name: Restore Cache
desciption: Restore cached files
inputs:
key:
required: true
type: string
default: default
runs:
using: composite
container:
image: alpine
volumes:
- /mnt/swarm/gitea/runner/cache:/cache
steps:
- run: |
mv "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" . || echo "Cache not found" && exit
tar -xzf "archive.tar.gz"
echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"