Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Oct 15, 2024
1 parent 879607b commit 20b9b7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ jobs:
files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
separator: ' '
version: '2.27.0'
output: 'json' # Output the Vale results in JSON format for parsing

- name: Check for Vale warnings
id: check-vale-warnings
run: |
if [[ $(jq '.warnings | length' < vale-output.json) -gt 0 ]]; then
vale_result=$(grep -c 'warning' <(cat /home/runner/reviewdog_issues.txt || true))
if [ "$vale_result" -gt 0 ]; then
echo "Vale found warnings or linting issues."
echo "has_warnings=true" >> $GITHUB_ENV
else
Expand All @@ -71,6 +71,7 @@ jobs:
fi
continue-on-error: true


- name: Post comment if Vale finds issues
if: ${{ env.has_warnings == 'true' }}
run: |
Expand Down

0 comments on commit 20b9b7d

Please sign in to comment.