Skip to content

Commit

Permalink
fix workflow syntax check with vale
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper committed Aug 24, 2023
1 parent 957c5a1 commit 167b17a
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/check-syntax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,35 @@ jobs:
uses: actions/checkout@main

- name: Download .vale.ini
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/.vale.ini"
run: wget https://raw.githubusercontent.com/fharper/gh-configs/main/.vale.ini -O .vale.ini

- name: Create the folders
run: |
mkdir -p styles && mkdir -p styles/Custom && mkdir -p styles/Vocab && mkdir -p styles/Vocab/base
- name: Download Custom Style ignore.txt
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/ignore.txt"
run: wget https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/ignore.txt -O styles/Custom/ignore.txt

- name: Download Custom Style spelling.yml
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/spelling.yml"
run: wget https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/spelling.yml -O styles/Custom/spelling.yml

- name: Download Custom Style substitutions.yml
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/substitutions.yml"
run: wget https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Custom/substitutions.yml -O styles/Custom/substitutions.yml

- name: Download base Vocab accept.txt
uses: suisei-cn/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Vocab/base/accept.txt"
run: wget https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Vocab/base/accept.txt -O styles/Vocab/base/accept.txt

- name: Download base Vocab reject.txt
uses: suisei-cn/[email protected]
- name: Get latest version of Vale
id: lastversion
uses: dvershinin/[email protected]
with:
url: "https://raw.githubusercontent.com/fharper/gh-configs/main/styles/Vocab/base/reject.txt"
repository: errata-ai/vale

- name: Install Vale
run: |
wget https://github.com/errata-ai/vale/releases/download/v${{ steps.lastversion.outputs.last_version }}/vale_${{ steps.lastversion.outputs.last_version }}_Linux_64-bit.tar.gz -O vale.tar.gz
tar -xvzf vale.tar.gz vale
rm vale.tar.gz
- name: Validate the syntax
uses: errata-ai/vale-action@reviewdog
with:
fail_on_error: true
vale_flags: "--config=.vale.ini"
run: ./vale --config=.vale.ini *.md

0 comments on commit 167b17a

Please sign in to comment.