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
|
|
|
|
|
|
|
runs:
|
2023-11-23 15:39:16 -05:00
|
|
|
using: composite
|
2023-11-23 15:30:34 -05:00
|
|
|
steps:
|
|
|
|
- run: |
|
2023-11-23 17:12:04 -05:00
|
|
|
PERSISTANT="/cache/workspace/${{ github.job }}"
|
|
|
|
mkdir -p "$PERSISTANT"
|
2023-11-23 15:49:33 -05:00
|
|
|
WORKSPACE=$(pwd)
|
2023-11-23 16:46:10 -05:00
|
|
|
cd ..
|
2023-11-23 17:14:26 -05:00
|
|
|
rm -rf "$WORKSPACE"
|
2023-11-23 17:12:04 -05:00
|
|
|
ln -fs "$PERSISTANT" "$WORKSPACE"
|
|
|
|
echo "Linked: $PERSISTANT -> $WORKSPACE"
|
|
|
|
echo "Workspace will be automatically deleted in 1 hour"
|
|
|
|
sleep 3600 && rm -rf "$PERSISTANT" &
|
2023-11-23 17:16:12 -05:00
|
|
|
shell: sh
|