Update .gitea/workflows/dockerbuild.yml
Some checks failed
Build with DinD / build (push) Failing after 24s

This commit is contained in:
2025-11-12 21:29:17 +00:00
parent 75a497eeb8
commit ceb429dd64

View File

@@ -1,58 +1,23 @@
name: Debug Docker Permissions name: Build with DinD
on: on:
push: push:
branches: [ main ] branches: [ main ]
jobs: jobs:
debug: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: docker:dind
options: --privileged
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Debug Environment
run: |
echo "=== System Information ==="
uname -a
cat /etc/os-release
echo "=== User Information ==="
whoami
id
groups
echo "=== Docker Setup ==="
which docker || echo "Docker not installed"
sudo systemctl status docker || echo "Docker service not running"
echo "=== Docker Socket ==="
ls -la /var/run/docker.sock || echo "No docker socket found"
- name: Add User to Docker Group
run: |
echo "Adding user to docker group..."
sudo usermod -aG docker $USER
echo "Current groups after modification:"
groups
- name: Test Docker Access - name: Test Docker Access
run: | run: |
echo "=== Testing Docker Access ==="
# Test without sudo (should work after usermod)
docker --version || echo "Docker command failed"
# Test with sudo (fallback)
sudo docker --version || echo "Sudo Docker failed"
# Test basic Docker functionality
docker info || echo "Docker info failed"
# Test with a simple container
docker run --rm hello-world || echo "Hello world test failed"
- name: Final Debug Check
run: |
echo "=== Final Debug Check ==="
echo "User: $USER"
echo "Groups: $(groups)"
echo "Docker version:"
docker --version docker --version
echo "Docker info:" docker info
docker info | head -10 docker run --rm hello-world
- name: Build and Push
run: |
docker build -t my-image:${{ github.sha }} .
# Your push commands here