Initial Commit of example scripts for the CSD Python API Paper #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Lint Markdown | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
paths: | |
- "**/*.md" | |
jobs: | |
markdownlint: | |
runs-on: ubuntu-latest | |
outputs: | |
changed-files: ${{ steps.file-changes.outputs.changed-files }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Modified files | |
id: file-changes | |
run: | | |
echo \ | |
"changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} \ | |
| grep '\.md' \ | |
| tr '\n' ' ')" \ | |
>> $GITHUB_OUTPUT | |
- name: Check GitHub event type to determine reporter type | |
run: | | |
if [ "${{ github.event_name }}" == "pull_request" ]; then | |
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV | |
else | |
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV | |
fi | |
- name: Run markdownlint | |
uses: reviewdog/action-markdownlint@v0 | |
with: | |
fail_on_error: false | |
filter_mode: diff_context | |
level: error | |
markdownlint_flags: ${{ steps.file-changes.outputs.changed-files }} | |
reporter: ${{ env.REVIEWDOG_REPORTER }} |