Update cache/action.yaml

This commit is contained in:
Zakary Timson 2023-12-20 04:34:25 +00:00
parent 9b52a68118
commit 797e8607cb

44
cache/action.yaml vendored
View File

@ -1,21 +1,23 @@
name: Cache Files name: Cache Files
desciption: Compress and cache files for later desciption: Compress and cache files for later
inputs: inputs:
key: key:
type: string type: string
required: false required: false
default: ${{github.job_id}} description: Key to store cache under
pattern: default: ${{github.run_id}}
type: string pattern:
required: false type: string
default: "*" required: false
description: Files that will be cached
runs: default: "*"
using: composite
steps: runs:
- run: | using: composite
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}" steps:
tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }} - run: |
echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
shell: sh tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
shell: sh