Files
postgres-actions/.gitea/actions/create/action.yml
Valentin Afanasev fdf0d4e40c fixes
2025-08-05 03:34:09 +03:00

24 lines
818 B
YAML

name: Run pg for tests
inputs:
service_name:
required: true
runs:
using: composite
steps:
- run: |
curl -s https://gitea.vecus.ru/ci/postgres-actions/raw/branch/master/.gitea/actions/create/postgres-template.yaml | envsubst | werf kubectl apply -f -
echo "Waiting for pod to be ready..."
timeout=600
while ! werf kubectl get pod ${POD_NAME} -o jsonpath='{.status.containerStatuses[0].ready}' 2>/dev/null | grep -q true; do
echo "Still not ready..."
sleep 2
timeout=$((timeout - 2))
[[ ${timeout} -le 0 ]] && echo "Timeout waiting for pod" && exit 10
done
shell: bash
env:
POD_NAME: ${{ inputs.service_name }}
APP_NAME: ${{ inputs.service_name }}
SERVICE_NAME: ${{ inputs.service_name }}