2023-08-06 22:16:31 -04:00
|
|
|
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:
|
|
|
|
- /mnt/swarm/gitea/runner/cache:/cache
|
|
|
|
steps:
|
|
|
|
- run: |
|
2023-08-06 22:20:33 -04:00
|
|
|
tar -czf "archive.tar.gz" ${{ inputs.pattern }}
|
2023-08-06 22:16:31 -04:00
|
|
|
mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}"
|
2023-08-06 22:33:01 -04:00
|
|
|
[ "$(md5sum "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz")" != "$(md5sum archive.tar.gz)" ] && mv archive.tar.gz "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/"
|