update ci/cd 9
Some checks failed
Deploy to Development / build-and-deploy (push) Failing after 14s

This commit is contained in:
EvanChal
2025-12-24 00:25:59 +01:00
parent 93c9935465
commit 857b136124

View File

@@ -25,11 +25,23 @@ jobs:
- name: Build and push frontend
run: |
echo "Testing DNS resolution..."
nslookup ${{ secrets.REGISTRY_URL }} || echo "DNS lookup failed"
ping -c 1 ${{ secrets.REGISTRY_URL }} || echo "Ping failed"
echo "Re-logging to registry..."
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
echo "Building frontend image..."
docker build -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:develop-frontend ./frontend
echo "Build successful, pushing..."
docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:develop-frontend
echo "Push successful!"
echo "Build successful, pushing with retry..."
for i in {1..3}; do
if docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/lediscord:develop-frontend; then
echo "✅ Push successful!"
exit 0
else
echo "❌ Push attempt $i failed"
if [ $i -lt 3 ]; then
echo "Re-logging and retrying in 3 seconds..."
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
sleep 3
fi
fi
done
echo "❌ All push attempts failed"
exit 1