games_app/deploy/gitea-stack/poll-ci-short.sh
Your Name 156d37ea26
All checks were successful
CI / test-and-build (push) Successful in 36s
Fix CI runner Docker image and deploy SSH ForceCommand wrapper
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-17 20:38:57 +02:00

17 lines
739 B
Bash

#!/usr/bin/env bash
set -euo pipefail
sudo docker logs tloto_act_runner --tail 20
sudo -u postgres psql -d gitea -c "SELECT id, left(title,40) AS title, status FROM action_run ORDER BY id DESC LIMIT 6;"
for i in 1 2 3 4 5 6; do
echo "--- wait $i ---"
sleep 15
sudo docker ps -a --format '{{.Names}} {{.Image}} {{.Status}}' | head -35
sudo docker logs tloto_act_runner --tail 10
st="$(sudo -u postgres psql -d gitea -tAc 'SELECT status FROM action_run ORDER BY id DESC LIMIT 1' | tr -d '[:space:]')"
echo "latest_status=$st"
if [[ "$st" == "3" || "$st" == "4" || "$st" == "5" ]]; then
break
fi
done
sudo -u postgres psql -d gitea -c "SELECT id, left(title,40) AS title, status FROM action_run ORDER BY id DESC LIMIT 6;"