From cf2d7d6ec9c0f7d4747c3e8f3aaa996b849c6e5b Mon Sep 17 00:00:00 2001 From: Vezpi Date: Wed, 11 Jun 2025 09:17:23 +0000 Subject: [PATCH] fix: remove function --- .gitea/workflows/deployment.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index 2ee45e8..4cba2a8 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -210,20 +210,16 @@ jobs: steps: - name: Notify Workflow Result run: | - echo "starting" - all_ok() { - for job in Check-Rebuild Build Deploy-Staging Test-Staging Merge Deploy-Production Test-Production Clean; do - echo "result=${{ needs.${job}.result }}"" - result="${{ needs.${job}.result }}" - if not [[ "$result" == "success" || "$result" == "skipped" ]]; then - echo "job $job returned 1" - return 1 - fi - echo "all ok" - done - } - - if all_ok; then + if [[ + "${{ needs.Check-Rebuild.result }}" == "success" && \ + ("${{ needs.Build.result }}" == "success" || "${{ needs.Build.result }}" == "skipped") && \ + "${{ needs.Deploy-Staging.result }}" == "success" && \ + "${{ needs.Test-Staging.result }}" == "success" && \ + "${{ needs.Merge.result }}" == "success" && \ + "${{ needs.Deploy-Production.result }}" == "success" && \ + "${{ needs.Test-Production.result }}" == "success" && \ + ("${{ needs.Clean.result }}" == "success" || "${{ needs.Clean.result }}" == "skipped") \ + ]]; 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 }}" \