From bd2179d8bf8502aad8d03b28740e07210705a463 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 13 Oct 2024 03:27:28 +0200 Subject: [PATCH] GH Actions/reusable-remark.yml: add "fail-on-warnings" configurable option Remark support a `--frail` flag, which makes Remark exit as failed when warnings are encountered. Previously, this option was always on. This commit makes this a configurable choice. The default behaviour remains the same though. Ref: https://github.com/remarkjs/remark-lint --- .github/workflows/reusable-remark.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-remark.yml b/.github/workflows/reusable-remark.yml index 9ceb880..475ee38 100644 --- a/.github/workflows/reusable-remark.yml +++ b/.github/workflows/reusable-remark.yml @@ -2,6 +2,12 @@ name: Remark on: workflow_call: + inputs: + fail-on-warnings: + description: 'Whether to exit as failed when there are warnings.' + type: boolean + required: false + default: true jobs: remark: @@ -64,7 +70,7 @@ jobs: - name: Run Remark-lint if: ${{ steps.has_config.outputs.files_exists == 'true' }} - run: remark . --frail + run: remark . ${{ inputs.fail-on-warnings && '--frail' || '' }} # @link https://github.com/reviewdog/action-remark-lint - name: Show Remark-lint annotations in PR