Update workspace/action.yaml

This commit is contained in:
Zakary Timson 2023-11-23 20:49:33 +00:00
parent 3efed68b97
commit 870ce66a9c

View File

@ -1,9 +1,18 @@
name: Load Workspace name: Load Workspace
description: Switch to job's persistant workspace description: Switch to job's persistant workspace
input:
key:
type: string
required: true
description: Workspace ID
runs: runs:
using: composite using: composite
steps: steps:
- run: | - run: |
mkdir -p /workspace/${{github.repository}}/${{github.job}} WORKSPACE=$(pwd)
cd /workspace/${{github.repository}}/${{github.job}} cd ..
rm -rf "$WORKSPACE"
mkdir -p "/workspace/${{inputs.key}}"
ln -s "/workspace/${{inputs.key}}" "$WORKSPACE"