2023-11-23 16:22:05 -05:00
|
|
|
name: Link Workspace
|
|
|
|
desciption: Connect persistant storage to workspace
|
2023-11-23 15:30:34 -05:00
|
|
|
|
2023-11-23 16:20:08 -05:00
|
|
|
inputs:
|
2023-11-23 15:49:33 -05:00
|
|
|
key:
|
|
|
|
required: true
|
2023-11-23 16:13:50 -05:00
|
|
|
type: string
|
2023-11-23 16:22:05 -05:00
|
|
|
default: default
|
2023-11-23 15:49:33 -05:00
|
|
|
|
2023-11-23 15:30:34 -05:00
|
|
|
runs:
|
2023-11-23 15:39:16 -05:00
|
|
|
using: composite
|
2023-11-23 15:30:34 -05:00
|
|
|
steps:
|
|
|
|
- run: |
|
2023-11-23 15:49:33 -05:00
|
|
|
WORKSPACE=$(pwd)
|
2023-11-23 16:46:10 -05:00
|
|
|
cd ..
|
|
|
|
rm -rf "$WORKSPACE"
|
2023-11-23 16:46:53 -05:00
|
|
|
mkdir -p "/cache/workspace/${{ inputs.key }}"
|
2023-11-23 16:46:10 -05:00
|
|
|
ln -fs "/cache/workspace/${{ inputs.key }}" "$WORKSPACE"
|
|
|
|
echo "Linked: /cache/workspace/${{ inputs.key }} -> $WORKSPACE"
|