From 24099506ed13d72d747bf211f46a113f3b0ab9c1 Mon Sep 17 00:00:00 2001 From: Ashley Weaver Date: Tue, 2 Jul 2024 10:26:56 -0400 Subject: [PATCH] Check exit code --- .github/workflows/broken-link-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 04153530..fd43f231 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -21,7 +21,7 @@ jobs: args: --no-progress --accept '200..=299, 401, 405' . continue-on-error: true - name: "Send Slack alert" - if: ${{ failure() }} + if: ${{ env.lychee_exit_code }} != 0 uses: slackapi/slack-github-action@v1.26.0 env: SLACK_WEBHOOK_URL: "https://hooks.slack.com/triggers/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" # TODO: set as env var? @@ -31,5 +31,5 @@ jobs: "Details": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" } - name: "Fail workflow" - if: ${{ failure() }} + if: ${{ env.lychee_exit_code }} != 0 run: exit ${{ env.lychee_exit_code }}