Skip to content

Commit

Permalink
Merge branch 'test-vale' into test-vale-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jun 14, 2024
2 parents af8b745 + ab3f9c7 commit 135e74e
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
for file in $(echo ${{ steps.changed-files.outputs.files }} | jq -r '.[]'); do
echo "Running Vale on $file"
vale --output=JSON $file > "vale_output_${file//\//_}.json"
vale --output=edit $file > "vale_output_${file//\//_}_edit.json"
vale --output=edit $file > "vale_output_${file//\//_}_edit.md"
done
echo "Vale outputs:"
ls -l
Expand All @@ -46,17 +46,11 @@ jobs:
run: |
for file in $(echo ${{ steps.changed-files.outputs.files }} | jq -r '.[]'); do
mv $file "${file}.original"
vale --output=edit $file > $file
mv "vale_output_${file//\//_}_edit.md" $file
done
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}

- name: Upload Vale results
uses: actions/upload-artifact@v3
with:
name: vale-results
path: '*.json'

- name: Upload corrected files
uses: actions/upload-artifact@v3
with:
Expand All @@ -71,11 +65,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Vale results
uses: actions/download-artifact@v3
with:
name: vale-results

- name: Download corrected files
uses: actions/download-artifact@v3
with:
Expand All @@ -95,7 +84,7 @@ jobs:
reviewdog_flags: ""
cleanup: "true"

- name: Run Reviewdog with Vale results
- name: Run Reviewdog with corrected files
run: |
for file in $(ls *.md.original); do
original="${file}"
Expand Down

0 comments on commit 135e74e

Please sign in to comment.