fix (?) workflow
This commit is contained in:
parent
87fee2bb52
commit
94e64ac368
1 changed files with 18 additions and 1 deletions
|
@ -42,10 +42,27 @@ jobs:
|
|||
run: |
|
||||
apk add --no-cache docker bash
|
||||
|
||||
- name: Start Docker daemon
|
||||
if: steps.compare.outputs.update == 'true'
|
||||
run: |
|
||||
dockerd & # start Docker daemon in background
|
||||
# Wait until Docker daemon is ready (max 30 seconds)
|
||||
timeout=30
|
||||
while ! docker info >/dev/null 2>&1; do
|
||||
if [ $timeout -le 0 ]; then
|
||||
echo "Docker daemon failed to start."
|
||||
exit 1
|
||||
fi
|
||||
echo "Waiting for Docker daemon..."
|
||||
sleep 3
|
||||
timeout=$((timeout - 3))
|
||||
done
|
||||
|
||||
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: steps.compare.outputs.update == 'true'
|
||||
run: |
|
||||
rc-service docker start
|
||||
docker build -t melody/docker-test:latest .
|
||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login git.shork.ch -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
docker push git.shork.ch/melody/docker-test:latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue