From d71435313ddb9f3af34a1c0480823d59de5b054a Mon Sep 17 00:00:00 2001 From: Lukas Spirig Date: Thu, 19 Dec 2024 15:28:14 +0100 Subject: [PATCH] build: allow sequential use of docker slim (#3315) --- .github/actions/docker-slim/action.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/actions/docker-slim/action.yml b/.github/actions/docker-slim/action.yml index 3f4550f49b..1b335d9cbc 100644 --- a/.github/actions/docker-slim/action.yml +++ b/.github/actions/docker-slim/action.yml @@ -13,11 +13,13 @@ runs: steps: - name: Setup docker slim run: | - mkdir /tmp/ds - cd /tmp/ds - curl -L -o ds.tar.gz https://github.com/slimtoolkit/slim/releases/download/1.40.11/dist_linux.tar.gz - tar -xvf ds.tar.gz --strip-components 1 - echo "/tmp/ds" >> $GITHUB_PATH + if [ -d "/tmp/ds" ]; then + mkdir /tmp/ds + cd /tmp/ds + curl -L -o ds.tar.gz https://github.com/slimtoolkit/slim/releases/download/1.40.11/dist_linux.tar.gz + tar -xvf ds.tar.gz --strip-components 1 + echo "/tmp/ds" >> $GITHUB_PATH + fi shell: bash - name: Run docker slim run: slim build --target ${{ inputs.target }} --tag ${{ inputs.tag }} --preserve-path /usr/share/nginx/html