mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-04-25 22:52:31 +08:00
Update workflow
This commit is contained in:
parent
9073de62d7
commit
fe5551156e
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -9,6 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
if: contains(github.ref, 'master')
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x]
|
node-version: [12.x]
|
||||||
|
27
.github/workflows/pull_request.yml
vendored
27
.github/workflows/pull_request.yml
vendored
@ -1,23 +1,24 @@
|
|||||||
name: Build PR (Standard)
|
name: Build PR (Standard)
|
||||||
on: [pull_request]
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'dependencies') }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x]
|
node-version: [12.x]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Use Node.js ${{ matrix.node_version }}
|
- name: Use Node.js ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
- name: npm install, build, and test
|
- name: npm install, build, and test
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run coverage
|
npm run coverage
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
56
.github/workflows/pull_request_dependabot.yml
vendored
56
.github/workflows/pull_request_dependabot.yml
vendored
@ -1,8 +1,6 @@
|
|||||||
name: Build PR (Dependabot)
|
name: Build PR (Dependabot)
|
||||||
|
|
||||||
on:
|
on: pull_request_target
|
||||||
pull_request_target:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -13,29 +11,29 @@ jobs:
|
|||||||
node-version: [12.x]
|
node-version: [12.x]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Use Node.js ${{ matrix.node_version }}
|
- name: Use Node.js ${{ matrix.node_version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
- name: npm install, build, and test
|
- name: npm install, build, and test
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run coverage
|
npm run coverage
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
- name: Merge PR
|
- name: Merge PR
|
||||||
if: success()
|
if: success()
|
||||||
uses: "pascalgn/automerge-action@v0.14.2"
|
uses: "pascalgn/automerge-action@v0.14.2"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
MERGE_LABELS: "dependencies"
|
MERGE_LABELS: "dependencies"
|
||||||
- name: Reject PR
|
- name: Reject PR
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/close-pull@v1
|
uses: peter-evans/close-pull@v1
|
||||||
with:
|
with:
|
||||||
pull-request-number: ${{github.event.number}}
|
pull-request-number: ${{github.event.number}}
|
||||||
comment: "Closing PR due to failing tests."
|
comment: "Closing PR due to failing tests."
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user