Fix gitea actions
This commit is contained in:
parent
398b36befb
commit
38e5826405
@ -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
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user