pipeline
Some checks failed
Probe-Mounts / build (push) Failing after 30s

This commit is contained in:
nilzbu
2025-08-09 18:26:31 +02:00
parent 9efdacea9e
commit 8dcd02c593

View File

@@ -11,14 +11,22 @@ jobs:
image: ci-java21-node20:latest image: ci-java21-node20:latest
steps: steps:
- name: Map gitea into /etc/hosts - name: Map gitea into /etc/hosts (ohne ip)
if: ${{ always() }} if: ${{ always() }}
shell: bash shell: bash
run: | run: |
set -euxo pipefail set -euo pipefail
GW="$(ip route | awk '/default/ {print $3}')" # Default-Gateway aus /proc/net/route in dotted quad umrechnen
echo "$GW gitea" >> /etc/hosts gw_hex="$(awk '$2=="00000000" {print $3; exit}' /proc/net/route || true)"
getent hosts gitea if [ -n "${gw_hex:-}" ]; then
gw="$(printf "%d.%d.%d.%d" 0x${gw_hex:6:2} 0x${gw_hex:4:2} 0x${gw_hex:2:2} 0x${gw_hex:0:2})"
else
gw="172.17.0.1" # Fallback: Standard-Docker-Bridge
fi
echo "$gw gitea" >> /etc/hosts
echo "$gw host.docker.internal" >> /etc/hosts || true
getent hosts gitea || true
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4