From f7ced6bcd6e07baf89e6ee7f67d7f8f8c532ab0e Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 16:00:03 +0100 Subject: [PATCH] fix if clause --- nf_core/pipeline-template/.github/workflows/awsfulltest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml index 2a3663bda..cd3912490 100644 --- a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml +++ b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml @@ -29,14 +29,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Check for approvals - if: steps.check_approvals.outputs == '' + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} run: | - echo "No approvals found" + echo "No review approvals found. At least 2 approvals are required to run this action automatically." exit 1 - name: Check for enough approvals (>=2) id: test_variables - if: github.event_name != 'workflow_dispatch' && steps.check_approvals.outputs != '' + if: github.event_name != 'workflow_dispatch' run: | JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'{% endraw %} CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')