From 870ce66a9c50a47d506125aac9c524217c0df63d Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Thu, 23 Nov 2023 20:49:33 +0000 Subject: [PATCH] Update workspace/action.yaml --- workspace/action.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/workspace/action.yaml b/workspace/action.yaml index 3c7683b..a7f3547 100644 --- a/workspace/action.yaml +++ b/workspace/action.yaml @@ -1,9 +1,18 @@ name: Load Workspace description: Switch to job's persistant workspace +input: + key: + type: string + required: true + description: Workspace ID + runs: using: composite steps: - run: | - mkdir -p /workspace/${{github.repository}}/${{github.job}} - cd /workspace/${{github.repository}}/${{github.job}} + WORKSPACE=$(pwd) + cd .. + rm -rf "$WORKSPACE" + mkdir -p "/workspace/${{inputs.key}}" + ln -s "/workspace/${{inputs.key}}" "$WORKSPACE"