41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Probe-Mounts
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ci-java21-node20:latest
|
|
|
|
steps:
|
|
- name: Map gitea into /etc/hosts (ohne ip)
|
|
if: ${{ always() }}
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
# Default-Gateway aus /proc/net/route in dotted quad umrechnen
|
|
gw_hex="$(awk '$2=="00000000" {print $3; exit}' /proc/net/route || true)"
|
|
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
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Write marker into shared volume
|
|
if: ${{ always() }}
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
date | tee /shared_jar_data/PROBE_MARKER.txt
|
|
ls -ld /shared_jar_data /shared_trigger_dir || true
|