maj 2
Some checks failed
Build & Deploy to Hostverge FTP (Gitea Actions) / build-and-deploy (push) Failing after 56s
Some checks failed
Build & Deploy to Hostverge FTP (Gitea Actions) / build-and-deploy (push) Failing after 56s
This commit is contained in:
@@ -15,14 +15,8 @@ jobs:
|
||||
env:
|
||||
GITEA_TOKEN: ${{ gitea.token }}
|
||||
run: |
|
||||
echo "=== 1. Forcer le routage IPv4 vers l'hôte Docker ==="
|
||||
# Récupération de l'IP passerelle via /proc/net/route (sans dépendance externe)
|
||||
HOST_IP=$(awk '$2 == "00000000" { printf("%d.%d.%d.%d\n", "0x" substr($3,7,2), "0x" substr($3,5,2), "0x" substr($3,3,2), "0x" substr($3,1,2)) }' /proc/net/route 2>/dev/null || echo "172.17.0.1")
|
||||
[ -z "$HOST_IP" ] && HOST_IP="172.17.0.1"
|
||||
echo "IP de l'hôte Docker détectée : $HOST_IP"
|
||||
|
||||
# Injecter l'IP de l'hôte pour git.kaelstudio.tech dans /etc/hosts
|
||||
echo "$HOST_IP git.kaelstudio.tech" >> /etc/hosts
|
||||
echo "=== 1. Liaison locale 127.0.0.1 pour git.kaelstudio.tech ==="
|
||||
echo "127.0.0.1 git.kaelstudio.tech" >> /etc/hosts
|
||||
|
||||
echo "=== 2. Configuration Git ==="
|
||||
git config --global http.sslVerify false
|
||||
@@ -30,8 +24,11 @@ jobs:
|
||||
|
||||
echo "=== 3. Initialisation et Clonage ==="
|
||||
git init .
|
||||
git remote add origin "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" || true
|
||||
git fetch --depth=1 origin "${{ gitea.ref_name || 'main' }}"
|
||||
# Tente via le domaine HTTPS (127.0.0.1:443 Nginx), et si besoin directement sur le port Gitea (127.0.0.1:6000)
|
||||
if ! git fetch --depth=1 "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}"; then
|
||||
echo "Fallback vers connexion directe port 6000..."
|
||||
git fetch --depth=1 "http://${GITEA_TOKEN}@127.0.0.1:6000/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}"
|
||||
fi
|
||||
git checkout -f FETCH_HEAD
|
||||
|
||||
- name: 🟢 Setup Node.js 20
|
||||
|
||||
Reference in New Issue
Block a user