Change ci.yml so it doesn't try to create DinD container if it's already created
Some checks failed
Some checks failed
This commit is contained in:
parent
c400f62e81
commit
08add38c14
1 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,14 @@ jobs:
|
||||||
docker exec ci-dind docker version
|
docker exec ci-dind docker version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If container exists but is not running, start it
|
||||||
|
if docker ps -a --format "table {{.Names}}\t{{.Status}}" | grep -q "^ci-dind.*Exited\|^ci-dind.*Created"; then
|
||||||
|
echo "DinD container exists but is not running, starting it..."
|
||||||
|
docker start ci-dind
|
||||||
|
# Wait for DinD to be ready
|
||||||
|
timeout 60 bash -c 'until docker exec ci-dind docker version; do sleep 2; done'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Checkout code to DinD container
|
- name: Checkout code to DinD container
|
||||||
run: |
|
run: |
|
||||||
# Checkout code directly into DinD container using the Forgejo repository that triggered the build
|
# Checkout code directly into DinD container using the Forgejo repository that triggered the build
|
||||||
|
|
Loading…
Add table
Reference in a new issue