diff --git a/.github/workflows/base-windows.yml b/.github/workflows/base-windows.yml index 07715bab36f7..07e5a6030b98 100644 --- a/.github/workflows/base-windows.yml +++ b/.github/workflows/base-windows.yml @@ -468,8 +468,10 @@ jobs: if: startsWith(matrix.os-name, 'windows') shell: bash run: | - cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new - mv ~/.docker/config.json.new ~/.docker/config.json + if [ -f ~/.docker/config.json ]; then + cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new + mv ~/.docker/config.json.new ~/.docker/config.json + fi - name: Change quarkus.version for Quarkus 2.2 to make mandrel-integration-test not apply quarkus_main.patch if: startsWith(matrix.os-name, 'windows') # See https://github.com/Karm/mandrel-integration-tests/pull/64 @@ -611,8 +613,10 @@ jobs: - name: Update Docker Client User Agent shell: bash run: | - cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new - mv ~/.docker/config.json.new ~/.docker/config.json + if [ -f ~/.docker/config.json ]; then + cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new + mv ~/.docker/config.json.new ~/.docker/config.json + fi - name: Build with Maven run: | cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars64.txt" diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 5e54959b80a0..10c39da39318 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -542,8 +542,10 @@ jobs: if: "!startsWith(matrix.os-name, 'windows')" shell: bash run: | - cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new - mv ~/.docker/config.json.new ~/.docker/config.json + if [ -f ~/.docker/config.json ]; then + cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new + mv ~/.docker/config.json.new ~/.docker/config.json + fi - name: Change quarkus.version for Quarkus 2.2 to make mandrel-integration-test not apply quarkus_main.patch if: "!startsWith(matrix.os-name, 'windows')" # See https://github.com/Karm/mandrel-integration-tests/pull/64 @@ -697,8 +699,10 @@ jobs: tar -xzvf jdk.tgz -C ${GRAALVM_HOME} --strip-components=1 - name: Update Docker Client User Agent run: | - cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new - mv ~/.docker/config.json.new ~/.docker/config.json + if [ -f ~/.docker/config.json ]; then + cat <<< $(jq '.HttpHeaders += {"User-Agent": "Mandrel-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json.new + mv ~/.docker/config.json.new ~/.docker/config.json + fi - name: Install gdb run: | sudo apt-get update -y