Update pnpm to v12.7.0 (#922) #2933
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Format, Lint | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| dedup-typescript-eslint: | |
| runs-on: ubuntu-latest | |
| if: endsWith(github.ref_name, '-eslint-group') && github.event_name != 'pull_request' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: true | |
| - uses: $/.github/actions/mise | |
| - run: pnpm up '@typescript-eslint/*' | |
| - uses: EndBug/add-and-commit@cc9c08ba6c8df3b93a8f2db63e89b98368ae2ae8 # v11.1.1 | |
| with: | |
| default_author: github_actions | |
| message: Deduplicate `@typescript/eslint` | |
| format: | |
| runs-on: ubuntu-latest | |
| needs: dedup-typescript-eslint | |
| if: (needs.dedup-typescript-eslint.result == 'skipped' || needs.dedup-typescript-eslint.result == 'success') && !cancelled() | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: true | |
| - uses: $/.github/actions/mise | |
| - run: hk run format --all | |
| - uses: EndBug/add-and-commit@cc9c08ba6c8df3b93a8f2db63e89b98368ae2ae8 # v11.1.1 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| default_author: github_actions | |
| message: Formatting | |
| - run: git status | |
| if: github.event_name == 'pull_request' | |
| lint: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.matrix.outputs.value }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: read | |
| needs: format | |
| if: needs.format.result == 'success' && !cancelled() | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: $/.github/actions/mise | |
| - run: hk run sarif --all --no-fail-fast | |
| - id: matrix | |
| if: "!cancelled()" | |
| run: | | |
| # shellcheck disable=SC2012 | |
| echo "value=[$(ls .sarif -Qm | sed s/\.sarif//g | tr '\n' ' ')]" >> "$GITHUB_OUTPUT" | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: "!cancelled()" | |
| with: | |
| name: sarif | |
| path: .sarif/* | |
| include-hidden-files: true | |
| - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| if: github.ref_name == 'dev' && !cancelled() | |
| with: | |
| commit-message: Linting | |
| title: Linting (${{ github.ref_name }}) | |
| branch: lint/${{ github.ref_name }} | |
| delete-branch: true | |
| - run: git status | |
| if: github.ref_name != 'dev' && !cancelled() | |
| upload-sarif: | |
| needs: lint | |
| runs-on: ubuntu-slim | |
| if: "!cancelled()" | |
| strategy: | |
| matrix: | |
| value: ${{ fromJSON(needs.lint.outputs.matrix) }} | |
| permissions: | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: sarif | |
| path: .sarif | |
| - uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 | |
| with: | |
| sarif_file: .sarif/${{ matrix.value }}.sarif | |
| category: ${{ matrix.value }} |