From bc6a1f0dd48b6d6a9e69cae0b9499cbe36e099e8 Mon Sep 17 00:00:00 2001 From: Alexey Alekhin Date: Fri, 15 Mar 2024 03:01:16 +0100 Subject: [PATCH] avoid using if: always() --- docs/examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index 183bc9c..7346c06 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -191,7 +191,7 @@ jobs: deny-licenses: LGPL-2.0, BSD-2-Clause - name: 'Report' # make sure this step runs even if the previous failed - if: always() + if: ${{ failure() && steps.review.conclusion == 'failure' }} shell: bash env: COMMENT: ${{ steps.review.outputs.comment-content }} @@ -199,7 +199,7 @@ jobs: echo "$COMMENT" - name: 'List vulnerable dependencies' # make sure this step runs even if the previous failed - if: always() + if: ${{ failure() && steps.review.conclusion == 'failure' }} shell: bash env: VULNERABLE_CHANGES: ${{ steps.review.outputs.vulnerable-changes }}