Skip to content

Instantly share code, notes, and snippets.

@ethomson
Created December 22, 2019 00:50
Show Gist options
  • Save ethomson/c858a2ed2fd9601ec18909461bd5e2e8 to your computer and use it in GitHub Desktop.
Save ethomson/c858a2ed2fd9601ec18909461bd5e2e8 to your computer and use it in GitHub Desktop.
name: Node CI
on:
pull_request:
branches:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm test
env:
CI: true
automerge:
name: Merge pull request
runs-on: [ubuntu-latest]
needs: [build]
if: github.base_ref == 'master' && github.actor == 'dependabot[bot]'
steps:
- name: Merge
uses: actions/[email protected]
with:
script: |
github.pullRequests.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
github-token: ${{github.token}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment