Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Merge pull request #274 from wp-pot/dependabot/github_actions/dependa… #354

Merge pull request #274 from wp-pot/dependabot/github_actions/dependa…

Merge pull request #274 from wp-pot/dependabot/github_actions/dependa… #354

Workflow file for this run

name: Node CI
on:
push:
branches:
- master
# Run tests for any PRs.
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 17.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install and test
run: |
npm ci
npm test
env:
CI: true
dependabot:
runs-on: ubuntu-latest
needs: [build]
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GH_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}