actions/cache/action.yaml

24 lines
640 B
YAML
Raw Normal View History

2023-12-19 23:34:25 -05:00
name: Cache Files
desciption: Compress and cache files for later
inputs:
key:
type: string
required: false
description: Key to store cache under
default: ${{github.run_id}}
pattern:
type: string
required: false
description: Files that will be cached
default: "*"
runs:
using: composite
steps:
- run: |
2024-05-13 10:55:30 -04:00
mkdir -p "/tmp/gitea/$GITHUB_REPOSITORY/${{ inputs.key }}"
tar --overwrite -czf "/tmp/gitea/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ${{ inputs.pattern }}
echo "Created cache: /tmp/gitea/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
2023-12-19 23:34:25 -05:00
shell: sh