Files
chocopiesmp/.gitea/workflows/verify.yaml
T
eldar af30217c78
Verify configuration / verify-healthy (push) Has been cancelled
Update .gitea/workflows/verify.yaml
2026-06-01 21:01:31 +02:00

41 lines
1.0 KiB
YAML

name: Verify configuration
env:
GITEA_TOKEN: ${{ secrets.GIT_TOKEN }}
on:
push:
branches:
- 'main'
- 'bleeding-edge'
jobs:
verify-healthy:
runs-on: ubuntu-latest
steps:
- name: Clone repo
run: git clone https://$GITEA_TOKEN@your-gitea.com/user/repo.git repo
- name: Start stack
run: docker compose up -d
- name: Show status
run: docker compose ps
- name: Check health
run: |
for i in {1..60}; do
status=$(docker inspect --format='{{if .State.Health}}{{.State.Health.Status}}{{else}}starting{{end}}' minecraftserver-mc-1 2>/dev/null || echo "missing")
if [ "$status" = "healthy" ]; then
echo "Server healthy"
exit 0
fi
sleep 5
done
echo "Server failed health check"
exit 1
- name: Cleanup
if: always()
run: docker compose down -v