|
29 | 29 | os: [macos-latest, windows-latest, ubuntu-latest] |
30 | 30 | permissions: |
31 | 31 | contents: read |
| 32 | + pull-requests: write |
32 | 33 | steps: |
33 | 34 | - run: echo '${{ github.actor }}' |
34 | 35 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
|
66 | 67 | - name: Debug export-detail.json on when pnpm docs:build fails with EMFILE error |
67 | 68 | if: failure() |
68 | 69 | run: cat ./docs/.next/export-detail.json || true |
| 70 | + - name: Extract Vale version |
| 71 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 72 | + id: vale-version |
| 73 | + run: | |
| 74 | + VERSION=$(node -p "(require('./package.json').config && require('./package.json').config.valeVersion) || ''") |
| 75 | + echo "vale_version=$VERSION" >> $GITHUB_OUTPUT |
| 76 | + - name: Cache Vale binary |
| 77 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 78 | + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
| 79 | + with: |
| 80 | + path: node_modules/.cache/mui-vale |
| 81 | + key: ${{ runner.os }}-mui-vale-${{ steps.vale-version.outputs.vale_version }} |
| 82 | + - uses: vale-cli/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1 |
| 83 | + continue-on-error: true # GitHub Action flag needed until https://github.com/errata-ai/vale-action/issues/89 is fixed |
| 84 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 85 | + with: |
| 86 | + version: ${{ steps.vale-version.outputs.vale_version }} |
| 87 | + # Errors should be more visible |
| 88 | + fail_on_error: true |
| 89 | + # The other reports don't work, not really https://github.com/reviewdog/reviewdog#reporters |
| 90 | + reporter: github-pr-check |
| 91 | + # Required, set by GitHub actions automatically: |
| 92 | + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret |
| 93 | + token: ${{secrets.GITHUB_TOKEN}} |
0 commit comments