actions/cache/action.yaml

24 lines
586 B
YAML
Raw Normal View History

2023-08-06 22:48:01 -04:00
name: Cache Files
desciption: Compress and cache files for later
2023-08-06 22:16:31 -04:00
inputs:
key:
required: true
type: string
default: default
pattern:
required: true
type: string
runs:
using: composite
container:
image: alpine
volumes:
2023-08-06 23:00:36 -04:00
- /mnt/swarm/gitea/runner/cache:/cache
2023-08-06 22:16:31 -04:00
steps:
- run: |
2023-08-06 23:00:36 -04:00
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
2023-08-07 09:34:28 -04:00
tar --overwrite -czf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
echo "Created cache: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"