-
Notifications
You must be signed in to change notification settings - Fork 25
52 lines (49 loc) · 1.37 KB
/
nodejs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Node.js CI
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Use Node.js 12
uses: actions/[email protected]
with:
node-version: 12
- name: Install dependencies
run: yarn install --frozen-lock-file
- name: Run linting
run: yarn lint
- name: Run tests
run: yarn test
env:
CI: true
automerge:
needs: build
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot Auto Merge
uses: actions/[email protected]
with:
github-token: ${{secrets.github_token}}
script: |
github.pulls.createReview({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
})
github.pulls.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
merge_method: 'rebase'
})