actions/cache/restore/action.yaml

18 lines
577 B
YAML
Raw Normal View History

2023-12-19 23:34:54 -05:00
name: Restore Cache
desciption: Restore cached files
inputs:
key:
type: string
required: false
description: Key to store cache under
default: ${{github.run_id}}
runs:
using: composite
steps:
- name: Create cache
run: |
[ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit
2024-02-28 23:54:21 -05:00
tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" && echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" || echo "Failed..."
2023-11-23 19:15:11 -05:00
shell: sh