Bind Action evaluation to the workflow PR head SHA #108
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: PatchGate Shadow | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| merge_group: | |
| types: [checks_requested] | |
| concurrency: | |
| group: patchgate-shadow-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| checks: write | |
| actions: read | |
| pull-requests: read | |
| contents: read | |
| jobs: | |
| evaluate: | |
| name: PatchGate Review-Readiness Shadow Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout trusted base repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies & Build | |
| run: | | |
| npm ci | |
| npm run build | |
| npm run bundle:action | |
| - name: Run PatchGate in Shadow Mode | |
| uses: ./ | |
| with: | |
| fail-on: never | |
| create-check-run: true | |
| github-token: ${{ github.token }} |