actions/cache/action.yaml

21 lines
532 B
YAML

name: Cache Files
desciption: Compress and cache files for later
inputs:
key:
required: true
type: string
default: default
pattern:
required: true
type: string
default: *
runs:
using: composite
steps:
- run: |
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"