diff --git a/.github/actions/docker-slim/action.yml b/.github/actions/docker-slim/action.yml index 1b335d9cbc..7b6f37ddf3 100644 --- a/.github/actions/docker-slim/action.yml +++ b/.github/actions/docker-slim/action.yml @@ -13,13 +13,14 @@ runs: steps: - name: Setup docker slim run: | - if [ -d "/tmp/ds" ]; then - mkdir /tmp/ds - cd /tmp/ds + mkdir -p /tmp/ds + cd /tmp/ds + if [ ! -f /tmp/ds/slim ]; then + rm -f ds.tar.gz 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 + echo "/tmp/ds" >> $GITHUB_PATH shell: bash - name: Run docker slim run: slim build --target ${{ inputs.target }} --tag ${{ inputs.tag }} --preserve-path /usr/share/nginx/html