Skip to content

Commit

Permalink
fix if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Dec 10, 2024
1 parent 0b7fe50 commit f7ced6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nf_core/pipeline-template/.github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit f7ced6b

Please sign in to comment.