From a69e13af08c84240e5e396b6943607041104f72d Mon Sep 17 00:00:00 2001 From: Vezpi Date: Wed, 11 Jun 2025 09:05:04 +0000 Subject: [PATCH] fix: change condition --- .gitea/workflows/deployment.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index 0d0ceb1..2648e80 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -210,7 +210,16 @@ jobs: steps: - name: Notify Workflow Result run: | - if [ "${{ success() }}" == "true" ]; then + all_ok() { + for job in Check-Rebuild Build Deploy-Staging Test-Staging Merge Deploy-Production Test-Production Clean; do + result="${{ needs.${job}.result }}" + if not [[ "$result" == "success" || "$result" == "skipped" ]]; then + return 1 + fi + done + } + + if all_ok; then curl -H "Priority: min" \ -H "Tags: white_check_mark" \ -H "Actions: view, View Run, ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}" \