Alright, NOW, it should do the trick
Build, push image, and notify Watchtower / build-image (push) Successful in 36s
Build, push image, and notify Watchtower / notify (push) Failing after 4s

This commit is contained in:
2026-07-16 18:45:47 +02:00
parent 1a2fbf0580
commit 5a32811842
+12 -4
View File
@@ -37,11 +37,19 @@ jobs:
steps:
- name: Notify Watchtower
run: |
# 1. Dynamically grab the Docker gateway IP of the host machine
HOST_IP=$(ip route | awk '/default/ {print $3}')
# 1. Grab the default gateway hex code from the routing table
HEX_GW=$(awk '$2 == "00000000" {print $3; exit}' /proc/net/route)
# 2. Convert little-endian Hex (e.g., 010011AC) to standard Decimal IP (172.17.0.1)
if [ -n "$HEX_GW" ]; then
HOST_IP=$(printf "%d.%d.%d.%d" 0x${HEX_GW:6:2} 0x${HEX_GW:4:2} 0x${HEX_GW:2:2} 0x${HEX_GW:0:2})
else
HOST_IP="172.17.0.1" # Standard fallback
fi
echo "Detected Docker Host Gateway IP: $HOST_IP"
# 2. Trigger Watchtower directly over local HTTP port 8080
# 3. Trigger Watchtower directly over local HTTP port 8080
curl -i -X POST \
-H "Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}" \
"http://$HOST_IP:8007/v1/update"
"http://$HOST_IP:8080/v1/update"