Test vale workflow changes per PR #1196 #93
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: Style check | |
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. | |
submodules: true | |
- run: git checkout HEAD^ | |
- 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: | | |
docs/** | |
versioned_docs/** | |
separator: "," | |
since_last_remote_commit: 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ 0 }} | |
- name: No files changed? | |
if: steps.changed-markdown-files.outputs.any_changed == 'false' | |
run: | | |
echo "No files changed" | |
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV | |
- 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 }} | |
ALL_CHANGED_FILES_COUNT: ${{ steps.changed-markdown-files.outputs.all_changed_files_count }} | |
run: | | |
echo ${ALL_CHANGED_FILES_COUNT} | |
echo ${ALL_CHANGED_FILES} | |
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV | |
- uses: errata-ai/[email protected] | |
if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
separator: ", " | |
files: ${{env.ALL_CHANGED_FILES}} |