ci: bump Actions off Node 20 runtime (#6) #21
Workflow file for this run
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: know-code | |
| # PR-only: grounded verification needs a merge-base ahead of HEAD. On a push | |
| # to main, HEAD *is* origin/main (zero commits ahead), so there is no range to | |
| # recompute and verify can never match a grounded hash. | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| # Default pull_request checkout is a merge commit (no trailers). | |
| # Verify must run on the PR tip that carries Know-Code-Verified. | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install and build CLI | |
| run: | | |
| npm install | |
| npm run build | |
| npm install -g ./packages/cli | |
| - name: Ensure requireTrailer for CI | |
| run: | | |
| mkdir -p .know-code | |
| printf '{\n "level": "standard",\n "baseBranch": "main",\n "requireTrailer": true\n}\n' > .know-code/config.json | |
| - name: Verify Know-Code-Verified trailer | |
| run: know-code verify |