diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index b798656a741..5d22af4fedc 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -27,14 +27,14 @@ jobs: BASE_SHA=$(git merge-base origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }}) CHANGED_FILES=$(git diff --name-only $BASE_SHA ${{ github.sha }} -- '*.md') echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV - echo "::set-output name=files::$(echo $CHANGED_FILES | jq -R -s -c 'split("\n")[:-1]')" + echo "CHANGED_FILES=$(echo $CHANGED_FILES | jq -R -s -c 'split(\"\n\")[:-1]')" >> $GITHUB_ENV - name: Print Changed Files run: echo $CHANGED_FILES - name: Run Vale on changed files run: | - for file in $(echo ${{ steps.changed-files.outputs.files }} | jq -r '.[]'); do + for file in ${{ env.CHANGED_FILES }}; do echo "Running Vale on $file" vale --output=JSON $file > "vale_output_${file//\//_}.json" vale --output=edit $file > "vale_output_${file//\//_}_edit.md" @@ -46,7 +46,7 @@ jobs: run: | mkdir -p original_files mkdir -p corrected_files - for file in $(echo ${{ steps.changed-files.outputs.files }} | jq -r '.[]'); do + for file in ${{ env.CHANGED_FILES }}; do echo "Copying $file to original_files/${file//\//_}.original" cp "$file" "original_files/${file//\//_}.original" echo "Copying vale_output_${file//\//_}_edit.md to corrected_files/${file//\//_}" @@ -64,14 +64,12 @@ jobs: with: name: original-files path: original_files/ - continue-on-error: true - name: Upload corrected files uses: actions/upload-artifact@v3 with: name: corrected-files path: corrected_files/ - continue-on-error: true suggest: # Reviewdog suggestion job runs-on: ubuntu-latest