From 351be9a2ca52cd8800773c42a5f0ffa113c74e5e Mon Sep 17 00:00:00 2001 From: GamesTrap Date: Thu, 7 Nov 2024 00:18:50 +0100 Subject: [PATCH] Update save-cache and restore-cache actions 11/06/2024 | 24w45a3 --- .github/composite/restore-cache/action.yml | 4 ++-- .github/composite/save-cache/action.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/composite/restore-cache/action.yml b/.github/composite/restore-cache/action.yml index fcae6c184..5b6414476 100644 --- a/.github/composite/restore-cache/action.yml +++ b/.github/composite/restore-cache/action.yml @@ -29,17 +29,17 @@ runs: run: | echo "TARGET_PATH=${{ github.event.repository.name }}/cache/${{inputs.key}}.7z" >> "$GITHUB_OUTPUT" - name: Check cache (Linux) - shell: bash -e {0} + shell: bash +e {0} id: check-cache-linux if: runner.os == 'Linux' run: | - set +e sudo apt install -y smbclient if smbclient //${{inputs.server-hostname}}/${{inputs.server-share}} -U ${{inputs.server-username}}%${{inputs.server-password}} -c 'ls "${{steps.build-dest-path.outputs.TARGET_PATH}}"' 2>/dev/null | grep -q "${{steps.build-dest-path.outputs.TARGET_PATH}}"; then echo "CACHE_HIT=true" >> "$GITHUB_OUTPUT" else echo "CACHE_HIT=false" >> "$GITHUB_OUTPUT" fi + exit "0" - name: Check cache (Windows) id: check-cache-windows shell: powershell diff --git a/.github/composite/save-cache/action.yml b/.github/composite/save-cache/action.yml index 5b9e48a39..ec9c48082 100644 --- a/.github/composite/save-cache/action.yml +++ b/.github/composite/save-cache/action.yml @@ -30,17 +30,17 @@ runs: echo "TARGET_PATH=${{ github.event.repository.name }}/cache/${{inputs.key}}.7z" >> "$GITHUB_OUTPUT" echo "TARGET_FOLDER_PATH=${{ github.event.repository.name }}/cache" >> "$GITHUB_OUTPUT" - name: Check cache (Linux) - shell: bash -e {0} + shell: bash +e {0} id: check-cache-linux if: runner.os == 'Linux' run: | - set +e sudo apt install -y smbclient - if smbclient //${{inputs.server-hostname}}/${{inputs.server-share}} -U ${{inputs.server-username}}%${{inputs.server-password}} -c 'ls "${{steps.build-dest-path.outputs.TARGET_PATH}}"' 2>/dev/null | grep -q "${{steps.build-dest-path.outputs.TARGET_PATH}}"; then + if [ smbclient //${{inputs.server-hostname}}/${{inputs.server-share}} -U ${{inputs.server-username}}%${{inputs.server-password}} -c 'ls "${{steps.build-dest-path.outputs.TARGET_PATH}}"' 2>/dev/null | grep -q "${{steps.build-dest-path.outputs.TARGET_PATH}}" ]; then echo "CACHE_HIT=true" >> "$GITHUB_OUTPUT" else echo "CACHE_HIT=false" >> "$GITHUB_OUTPUT" fi + exit "0" - name: Check cache (Windows) id: check-cache-windows shell: powershell