chore: update ci-cd.yml
This commit is contained in:
@@ -1,29 +1,48 @@
|
|||||||
name: Minimal Test
|
name: Final Network Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_URL: docker-registry:5000
|
||||||
|
IMAGE_NAME: michaelschiemer
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test-connectivity:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Basic Test
|
- name: Test Network and DNS
|
||||||
run: |
|
run: |
|
||||||
echo "✅ Workflow is running!"
|
echo "🔍 Testing network connectivity..."
|
||||||
echo "Container environment:"
|
echo "Host entries:"
|
||||||
uname -a
|
cat /etc/hosts | grep -E "(gitea|docker-registry)"
|
||||||
echo "Available commands:"
|
echo "Testing Gitea connectivity:"
|
||||||
which docker || echo "Docker not available"
|
curl -v --connect-timeout 10 http://gitea:3000 || echo "❌ Cannot reach Gitea"
|
||||||
which git || echo "Git not available"
|
echo "Testing Registry connectivity:"
|
||||||
echo "Network test:"
|
curl -v --connect-timeout 10 http://docker-registry:5000/v2/ || echo "❌ Cannot reach Registry"
|
||||||
curl --connect-timeout 5 http://gitea:3000 || echo "Cannot reach gitea"
|
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Success
|
||||||
run: |
|
run: |
|
||||||
echo "🎉 Checkout successful!"
|
echo "🎉 All tests passed!"
|
||||||
ls -la
|
echo "✅ Network connectivity working"
|
||||||
|
echo "✅ Checkout successful"
|
||||||
|
echo "✅ Registry login working"
|
||||||
|
echo "✅ Docker build and push working"
|
||||||
|
|||||||
Reference in New Issue
Block a user