Added compose-wait-healthy.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 10:41:22 -07:00
parent 38a77422b9
commit 0c26e7a41c
2 changed files with 94 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
name: compose-wait-healthy
description: "Wait until every named docker-compose service reports 'healthy' (or 'running' when no HEALTHCHECK is defined). On timeout, dumps tail logs for diagnosis."
inputs:
services:
description: "Whitespace-separated list of compose service names to wait on."
required: true
deadline:
description: "Per-invocation deadline in seconds before the action fails."
required: false
default: "600"
poll:
description: "Seconds between polls."
required: false
default: "5"
project:
description: "Compose project name (passed as -p). Optional."
required: false
default: ""
workingDirectory:
description: "Directory containing the compose.yml/compose.yaml. Defaults to repo root."
required: false
default: "."
runs:
using: "composite"
steps:
- name: "Wait for healthy"
shell: bash
working-directory: ${{ inputs.workingDirectory }}
env:
WAIT_HEALTHY_SERVICES: ${{ inputs.services }}
WAIT_HEALTHY_DEADLINE: ${{ inputs.deadline }}
WAIT_HEALTHY_POLL: ${{ inputs.poll }}
COMPOSE_PROJECT: ${{ inputs.project }}
run: bash "$GITHUB_ACTION_PATH/wait-healthy.sh"