Merge pull request #515 from NodeSecure/dependabot/github_actions/git… #223
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: Node.js CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| os: [ubuntu-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install socket firewall | |
| run: npm i -g sfw | |
| - name: Install dependencies | |
| run: npm install --ignore-scripts | |
| - name: Install chromium | |
| run: npx puppeteer browsers install chrome | |
| - name: build | |
| run: npm run build | |
| - name: Lint | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm run test | |
| automerge: | |
| if: > | |
| github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' | |
| needs: | |
| - test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Merge Dependabot PR | |
| uses: fastify/github-action-merge-dependabot@73ec4cbb5e56df5591eae286972d5b2201ffe90f # v3.15.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |