Fix gitea actions
Some checks failed
Build & Deploy Costco Grocery List / build (push) Successful in 16s
Build & Deploy Costco Grocery List / deploy (push) Successful in 7s
Build & Deploy Costco Grocery List / notify (push) Failing after 2s

This commit is contained in:
Nico 2025-11-26 20:57:26 -08:00
parent 398b36befb
commit 38e5826405

View File

@ -106,26 +106,30 @@ jobs:
EOF EOF
notify: notify:
- name: Wait for ntfy service to be healthy needs: deploy
run: | runs-on: ubuntu-latest
ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP '
echo "Waiting for ntfy container..." steps:
for i in {1..30}; do - name: Wait for ntfy service to be healthy
STATUS=$(docker inspect --format="{{json .State.Health.Status }}" ntfy) run: |
if [[ $STATUS == "\"healthy\"" ]]; then ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP '
echo "ntfy is healthy!" echo "Waiting for ntfy container..."
exit 0 for i in {1..30}; do
fi STATUS=$(docker inspect --format="{{json .State.Health.Status }}" ntfy)
echo "ntfy not ready yet ($STATUS). Retrying..." if [[ $STATUS == "\"healthy\"" ]]; then
sleep 2 echo "ntfy is healthy!"
done exit 0
echo "Error: ntfy did not become healthy in time." fi
exit 1 echo "ntfy not ready yet ($STATUS). Retrying..."
' sleep 2
done
- name: Notify ntfy echo "Error: ntfy did not become healthy in time."
run: | exit 1
curl -d "🚀 Deployment successful: $IMAGE_NAME:$GITHUB_SHA" \ '
https://ntfy.nicosaya.com/server-deploy
- name: Notify ntfy
run: |
curl -d "🚀 Deployment successful: $IMAGE_NAME:$GITHUB_SHA" \
https://ntfy.nicosaya.com/server-deploy