diff --git a/.github/workflows/broken-link-check.yml b/.github/workflows/broken-link-check.yml index 1a15d7bd..80a45664 100644 --- a/.github/workflows/broken-link-check.yml +++ b/.github/workflows/broken-link-check.yml @@ -15,11 +15,10 @@ jobs: uses: lycheeverse/lychee-action@v1 id: lychee with: - fail: true jobSummary: true args: --no-progress --accept '200..=299, 401, 405' . - - name: "Send Slack alert if failing" - if: always() && env.lychee_exit_code != 0 + - name: "Send Slack alert" + 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? @@ -28,3 +27,6 @@ jobs: { "Details": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" } + - name: "Fail workflow" + if: env.lychee_exit_code != 0 + run: exit ${{ env.lychee_exit_code }}