Update cache/action.yaml
This commit is contained in:
24
cache/action.yaml
vendored
Normal file
24
cache/action.yaml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Compress Files
|
||||
desciption: Compress files into a gziped archive
|
||||
|
||||
inputs:
|
||||
key:
|
||||
required: true
|
||||
type: string
|
||||
default: default
|
||||
pattern:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
container:
|
||||
image: alpine
|
||||
volumes:
|
||||
- /cache:/cache
|
||||
steps:
|
||||
- run: |
|
||||
tar -czf "archive.tar.gz" ${{ inputs.pattern }}
|
||||
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
|
||||
ARCHIVE="/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
|
||||
[[ ! -f "$ARCHIVE" || "$(md5sum "$ARCHIVE")" != "$(md5sum archive.tar.gz)" ]] && mv archive.tar.gz "$ARCHIVE"
|
Reference in New Issue
Block a user