Skip to content

Commit

Permalink
Only update ~/.docker/config.json if it exists
Browse files Browse the repository at this point in the history
Follow up to graalvm#641

Closes graalvm#642
  • Loading branch information
zakkak committed Dec 18, 2023
1 parent e654b69 commit 8d7cd38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/base-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d7cd38

Please sign in to comment.