chore: update ci-cd.yml

This commit is contained in:
2025-07-17 22:16:24 +02:00
parent 2e47ff9b7c
commit ee1bda2152

View File

@@ -1,29 +1,48 @@
name: Minimal Test
name: Final Network Test
on:
push:
branches: [ main, develop ]
env:
REGISTRY_URL: docker-registry:5000
IMAGE_NAME: michaelschiemer
jobs:
test:
test-connectivity:
runs-on: ubuntu-latest
steps:
- name: Basic Test
- name: Test Network and DNS
run: |
echo "✅ Workflow is running!"
echo "Container environment:"
uname -a
echo "Available commands:"
which docker || echo "Docker not available"
which git || echo "Git not available"
echo "Network test:"
curl --connect-timeout 5 http://gitea:3000 || echo "Cannot reach gitea"
echo "🔍 Testing network connectivity..."
echo "Host entries:"
cat /etc/hosts | grep -E "(gitea|docker-registry)"
echo "Testing Gitea connectivity:"
curl -v --connect-timeout 10 http://gitea:3000 || echo "❌ Cannot reach Gitea"
echo "Testing Registry connectivity:"
curl -v --connect-timeout 10 http://docker-registry:5000/v2/ || echo "❌ Cannot reach Registry"
- name: Checkout Code
uses: actions/checkout@v4
- name: Test Registry Login
run: |
echo "🔐 Testing registry login..."
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY_URL }} -u admin --password-stdin
- name: Build Test Image
run: |
echo "🏗️ Building test image..."
echo 'FROM alpine:latest' > Dockerfile
echo 'RUN echo "Test successful"' >> Dockerfile
docker build -t ${{ env.REGISTRY_URL }}/${{ env.IMAGE_NAME }}/test:latest .
docker push ${{ env.REGISTRY_URL }}/${{ env.IMAGE_NAME }}/test:latest
- name: Success
run: |
echo "🎉 Checkout successful!"
ls -la
echo "🎉 All tests passed!"
echo "✅ Network connectivity working"
echo "✅ Checkout successful"
echo "✅ Registry login working"
echo "✅ Docker build and push working"