From 6be9f2f701122f563efa23927dc5ef139abc2761 Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Mon, 7 Aug 2023 02:16:31 +0000 Subject: [PATCH] Add cache/store/action.yaml --- cache/store/action.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cache/store/action.yaml diff --git a/cache/store/action.yaml b/cache/store/action.yaml new file mode 100644 index 0000000..af4b705 --- /dev/null +++ b/cache/store/action.yaml @@ -0,0 +1,23 @@ +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: | + tar -czf "${{ inputs.out }}" ${{ inputs.pattern }} + mkdir -p "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}" + mv "${{ inputs.out }}" "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/"