Added compose-wait-healthy.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user