Skip to content

Commit d25a6fd

Browse files
committed
ensure docker is running before starting
1 parent 16d89a1 commit d25a6fd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/build-x86_64-unknown-linux-gnu.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,19 @@ jobs:
4545
ASSET_NAME: "rust-${{ github.event.inputs.release_version }}-x86_64-unknown-linux-gnu.tar.xz"
4646
ASSET_CONTENT_TYPE: "application/x-tar"
4747
steps:
48-
- name: Initialize Docker
48+
- name: Initialize docker
4949
run: |
50+
if ! launchctl list | grep -q com.docker.docker; then
51+
echo "Starting Docker..."
52+
open --background -a Docker
53+
# Wait for Docker to start
54+
while ! docker system info > /dev/null 2>&1; do
55+
echo "Waiting for Docker to start..."
56+
sleep 10
57+
done
58+
else
59+
echo "Docker is already running."
60+
fi
5061
docker container rm rust-linux || echo "Container name rust-linux is available"
5162
- name: Checkout repository
5263
uses: actions/checkout@v5

0 commit comments

Comments
 (0)