0c26e7a41c
Co-authored-by: Copilot <copilot@github.com>
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
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"
|