Skip to content

Set permissions for workflow jobs #212

Set permissions for workflow jobs

Set permissions for workflow jobs #212

Workflow file for this run

name: Node.js CI

Check failure on line 1 in .github/workflows/nodejs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/nodejs.yml

Invalid workflow file

(Line: 11, Col: 5): Unexpected value 'contents', (Line: 12, Col: 5): Unexpected value 'pull-requests', (Line: 11, Col: 5): There's not enough info to determine what you meant. Add one of these properties: cancel-timeout-minutes, container, continue-on-error, defaults, env, environment, outputs, runs-on, secrets, services, snapshot, steps, timeout-minutes, uses, with
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
permissions:
contents: read
pull-requests: write
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 19.x, 20.x, 21.x, 22.x, 23.x, 24.x, 25.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test