Skip to content

Commit

Permalink
GH Actions/reusable-remark.yml: add "fail-on-warnings" configurable o…
Browse files Browse the repository at this point in the history
…ption

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
  • Loading branch information
jrfnl committed Oct 13, 2024
1 parent 8de7f10 commit bd2179d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/reusable-remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bd2179d

Please sign in to comment.