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