diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 6eb0435d16..82f17ad288 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -12,17 +12,19 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Determine Changed Files id: changed-files + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | ALL_FILES=$(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files.[] | select(.additions > 0) | .path') CHANGED_FILES="${ALL_FILES//$'\n'/,}" echo "[DEBUG] Following files have been changed: $CHANGED_FILES" echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Vale Linter # vale fails if the PR is too large, e.g. when updating API docs if: ${{ github.event.pull_request.changed_files < 100 }} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} uses: vale-cli/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1 with: # version of 'vale' to use @@ -34,15 +36,12 @@ jobs: separator: "," # let review dog fail if there are errors fail_on_error: true - env: - # Required - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 20 - - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - id: cache + - id: cache + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: node_modules key: ubuntu-latest-${{ hashFiles('**/package-lock.json') }} @@ -61,8 +60,8 @@ jobs: uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 20 - - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - id: cache + - id: cache + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: node_modules key: ubuntu-latest-${{ hashFiles('**/package-lock.json') }} @@ -85,12 +84,12 @@ jobs: with: github-token: '${{ secrets.GITHUB_TOKEN }}' - name: Approve a PR - run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: gh pr review --approve "$PR_URL" - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: gh pr merge --auto --squash "$PR_URL"