Skip to content

Commit

Permalink
Temporary fix of localhost address lookup on GitHub
Browse files Browse the repository at this point in the history
Temporary fix until GitHub fix issue on their environment
 actions/runner-images#3185

Signed-off-by: Michal Banik <[email protected]>
  • Loading branch information
Michal Banik committed Apr 21, 2021
1 parent 97dc867 commit 3293fab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY}}
steps:
- uses: actions/checkout@v2
# TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file
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
# DONT'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED!
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -53,4 +58,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Surefire-Test-Results
path: ~/**/surefire-reports/**/*.txt
path: ~/**/surefire-reports/**/*.txt

0 comments on commit 3293fab

Please sign in to comment.