-
-
Notifications
You must be signed in to change notification settings - Fork 58
45 lines (37 loc) · 1.13 KB
/
merger.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
name: Format and merge PRs
on:
pull_request:
types: [labeled]
jobs:
format-merge:
runs-on: ubuntu-latest
steps:
- uses: zwaldowski/match-label-action@v1
id: label
with:
allowed: >
lgtm
- uses: actions/checkout@v1
if: steps.label.outputs.match == 'lgtm'
- name: Use Node.js 12.x
if: steps.label.outputs.match == 'lgtm'
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install
if: steps.label.outputs.match == 'lgtm'
run: yarn install
- name: Run prettier
if: steps.label.outputs.match == 'lgtm'
run: yarn run prettier --write 'src/**/*.js'
- uses: stefanzweifel/[email protected]
if: steps.label.outputs.match == 'lgtm'
with:
commit_message: Prettier
branch: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: maxkomarychev/[email protected]
if: steps.label.outputs.match == 'lgtm'
with:
token: ${{ secrets.GITHUB_TOKEN }}