ci/cd update 5
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 2s

This commit is contained in:
EvanChal
2025-12-24 03:45:04 +01:00
parent 362b19fd66
commit 7325f25b5f

View File

@@ -20,6 +20,14 @@ jobs:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "DNS configured:"
cat /etc/resolv.conf
# Ajouter l'IP du registry à /etc/hosts si disponible
if [ -n "${{ secrets.REGISTRY_IP }}" ]; then
echo "${{ secrets.REGISTRY_IP }} ${{ secrets.REGISTRY_URL }}" >> /etc/hosts
echo "Added to /etc/hosts: ${{ secrets.REGISTRY_IP }} ${{ secrets.REGISTRY_URL }}"
fi
# Tester la résolution DNS
echo "Testing DNS resolution..."
getent hosts ${{ secrets.REGISTRY_URL }} || echo "DNS resolution test"
- name: Login to Gitea Registry
run: |
@@ -28,13 +36,13 @@ jobs:
- name: Build and push
run: |
echo "Building backend image..."
docker build -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-backend ./backend
docker build --dns 192.168.1.50 --dns 8.8.8.8 -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-backend ./backend
docker tag ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-backend ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:latest-backend
echo "Pushing backend images..."
docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-backend
docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:latest-backend
echo "Building frontend image..."
docker build -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-frontend ./frontend
docker build --dns 192.168.1.50 --dns 8.8.8.8 -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-frontend ./frontend
docker tag ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-frontend ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:latest-frontend
echo "Pushing frontend images..."
docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:prod-frontend