Skip to content

Commit

Permalink
Add workaround for "ConnectTimeoutException: connection timed out" on…
Browse files Browse the repository at this point in the history
… GitHub Actions

Sporadic failures are observed on GitHub Actions when running on Ubuntu 20.04
Related to actions/runner-images#3185
  • Loading branch information
violetagg committed Apr 15, 2021
1 parent 18a5f62 commit 4fbf0a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/check_transport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
if: matrix.os == 'ubuntu-20.04'
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
versionType: ${{ steps.version.outputs.versionType }}
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- name: setup java
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -46,6 +50,10 @@ jobs:
environment: snapshots
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- uses: actions/setup-java@v1
with:
java-version: 8
Expand All @@ -65,6 +73,10 @@ jobs:
environment: releases
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- uses: actions/setup-java@v1
with:
java-version: 8
Expand Down

0 comments on commit 4fbf0a5

Please sign in to comment.