From ab7afc453a32d6a3ab1abc99d85c592ec5d8e848 Mon Sep 17 00:00:00 2001 From: Joel Guittet Date: Wed, 5 Nov 2025 07:42:56 +0100 Subject: [PATCH] action: clean zephyr-sdk directory before extraction Remove existing zephyr-sdk directory before extraction, and the archive after extraction. This is useful for self-hosted runners on which the files/directories remain between executions. Signed-off-by: Joel Guittet --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index ed9c293..00b317f 100644 --- a/action.yml +++ b/action.yml @@ -213,6 +213,7 @@ runs: shell: bash run: | wget --progress=dot:giga ${{ inputs.sdk-base }}/v${SDK_VERSION}/${SDK_FILE} + rm -rf zephyr-sdk if [ "${{ runner.os }}" = "Windows" ]; then 7z x $SDK_FILE mv zephyr-sdk-${SDK_VERSION} zephyr-sdk @@ -220,6 +221,7 @@ runs: mkdir zephyr-sdk tar xvf $SDK_FILE -C zephyr-sdk --strip-components=1 fi + rm -f $SDK_FILE - name: Setup Zephyr SDK working-directory: ${{ inputs.base-path }}/zephyr-sdk