46 lines
910 B
YAML
46 lines
910 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
# push:
|
|
# branches:
|
|
# - '**'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Wait
|
|
run: sleep 10
|
|
|
|
- name: Verify Docker daemon is running
|
|
run: |
|
|
echo "Testing Docker daemon connection..."
|
|
docker info
|
|
|
|
- name: List running containers
|
|
run: |
|
|
echo "Listing all containers..."
|
|
docker ps -a
|
|
|
|
- name: Test Docker functionality
|
|
run: |
|
|
echo "Testing basic Docker operations..."
|
|
docker run --rm hello-world
|
|
|
|
- name: Verify DIND isolation
|
|
run: |
|
|
echo "Testing container isolation..."
|
|
docker run --rm alpine:latest echo "DIND is working perfectly!"
|
|
|
|
|