Skip to content

Commit

Permalink
Update GH action workflow vale_3 to cover changes to versioned docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSaintarbor committed Feb 22, 2024
1 parent be4387a commit 466d004
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/vale_3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: reviewdog
on: [pull_request]

jobs:
vale-lint:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get all changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@v42
with:
# Avoid using single or double quotes for multiline patterns
files: |
**.md
separator: ","
- name: List all changed files markdown files
if: steps.changed-markdown-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
run: |
echo ${ALL_CHANGED_FILES}
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV
done
- name: No files changed?
if: steps.changed-markdown-files.outputs.any_changed == 'false'
env:
ALL_CHANGED_FILES: ${{ 0 }}
run: |
echo "${ALL_CHANGED_FILES}"
for file in ${ALL_CHANGED_FILES}; do
echo "No filed changed"
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV
done
- uses: errata-ai/vale-action@reviewdog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
separator: ","
files: ${{env.ALL_CHANGED_FILES}}

0 comments on commit 466d004

Please sign in to comment.