Skip to content

Commit

Permalink
Merge pull request #29 from MyUnisoft/auto-merge
Browse files Browse the repository at this point in the history
ci: add Node.js test workflow + auto-merge for dependabot
  • Loading branch information
fraxken authored Jan 3, 2025
2 parents d9ca149 + 54fe55d commit 58980f8
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Node.js CI

on:
push:
branches: main
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
fail-fast: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2.6.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- 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@c3bde0759d4f24db16f7b250b2122bc2df57e817 # v3.11.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 58980f8

Please sign in to comment.