actions/cache/restore/action.yaml

18 lines
539 B
YAML
Raw Normal View History

2023-11-23 19:00:10 -05:00
name: Restore Cache
desciption: Restore cached files
inputs:
key:
type: string
2023-11-23 19:11:20 -05:00
required: false
default: ${{github.job_id}}
2023-11-23 19:00:10 -05:00
runs:
using: composite
steps:
2023-11-23 19:11:20 -05:00
- name: Create cache
run: |
2023-11-23 19:00:10 -05:00
[ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit
tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
2023-11-23 19:15:11 -05:00
echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
shell: sh