Update cache/restore/action.yaml

This commit is contained in:
Zakary Timson 2023-12-20 04:34:54 +00:00
parent 797e8607cb
commit 66e4f8a062

View File

@ -1,18 +1,19 @@
name: Restore Cache name: Restore Cache
desciption: Restore cached files desciption: Restore cached files
inputs: inputs:
key: key:
type: string type: string
required: false required: false
default: ${{github.job_id}} description: Key to store cache under
default: ${{github.run_id}}
runs:
using: composite runs:
steps: using: composite
- name: Create cache steps:
run: | - name: Create cache
[ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit run: |
tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" [ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit
echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
shell: sh shell: sh