Update workspace/action.yaml
This commit is contained in:
parent
a73f63c44f
commit
42e9a5a74c
@ -1,19 +1,15 @@
|
|||||||
name: Link Workspace
|
name: Link Workspace
|
||||||
desciption: Connect persistant storage to workspace
|
desciption: Connect persistant storage to workspace
|
||||||
|
|
||||||
inputs:
|
|
||||||
key:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
default: default
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
|
PERSISTANT="/cache/workspace/${{ github.job }}"
|
||||||
|
mkdir -p "$PERSISTANT"
|
||||||
WORKSPACE=$(pwd)
|
WORKSPACE=$(pwd)
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf "$WORKSPACE"
|
ln -fs "$PERSISTANT" "$WORKSPACE"
|
||||||
mkdir -p "/cache/workspace/${{ inputs.key }}"
|
echo "Linked: $PERSISTANT -> $WORKSPACE"
|
||||||
ln -fs "/cache/workspace/${{ inputs.key }}" "$WORKSPACE"
|
echo "Workspace will be automatically deleted in 1 hour"
|
||||||
echo "Linked: /cache/workspace/${{ inputs.key }} -> $WORKSPACE"
|
sleep 3600 && rm -rf "$PERSISTANT" &
|
||||||
|
Loading…
Reference in New Issue
Block a user