Add .gitea/workflows/test-dind.yaml

This commit is contained in:
2026-08-12 09:54:41 +02:00
parent e4d0579006
commit 17514f5855
+41
View File
@@ -0,0 +1,41 @@
name: Test DinD Capabilities
on:
push:
branches: [ main, master ]
workflow_dispatch: # Allows manual trigger from Gitea UI
jobs:
test-dind:
runs-on: ubuntu-latest # Change to your runner tag if customized
# If your runner uses docker-container execution mode without automatic DinD sidecars,
# you can uncomment the service below:
# services:
# docker:
# image: docker:dind
# privileged: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify Docker CLI Availability
run: |
docker version
docker info
- name: Test Running a Container (Docker Pull & Run)
run: |
echo "Testing basic container execution..."
docker run --rm alpine:latest echo "DinD works: Container successfully executed!"
- name: Test Building an Image
run: |
echo "Testing docker build..."
echo "FROM alpine:latest" > Dockerfile
echo "RUN echo 'Built inside DinD' > /test.txt" >> Dockerfile
echo "CMD cat /test.txt" >> Dockerfile
docker build -t test-dind-image:local .
docker run --rm test-dind-image:local