Update cache/action.yaml

This commit is contained in:
Zakary Timson 2023-11-23 23:59:46 +00:00
parent fd27848744
commit 72583f2887

43
cache/action.yaml vendored
View File

@ -1,23 +1,20 @@
name: Cache Files name: Cache Files
desciption: Compress and cache files for later desciption: Compress and cache files for later
inputs: inputs:
key: key:
required: true required: true
type: string type: string
default: default default: default
pattern: pattern:
required: true required: true
type: string type: string
default: *
runs:
using: composite runs:
container: using: composite
image: alpine steps:
volumes: - run: |
- /mnt/swarm/gitea/runner/cache:/cache 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 }}"
tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"