Skip to content

Commit 79fb404

Browse files
authored
Create lint.yml
1 parent b786b86 commit 79fb404

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/lint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches:
4+
- "**"
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Setup repo
10+
uses: actions/checkout@v2
11+
12+
- name: Run linters
13+
run: make lint
14+
15+
- name: Make sure there are no diffs
16+
run:
17+
git diff && exit $(git status --porcelain=v1
18+
2>/dev/null | wc -l)
19+
20+
- name: Create Pull Request
21+
id: cpr
22+
uses: peter-evans/create-pull-request@v3
23+
if: ${{ failure() }}
24+
with:
25+
token: ${{ secrets.WORKFLOW_TOKEN }}
26+
commit-message:
27+
Automated - Lint ${{ github.ref_name }}
28+
title: Automated - Lint ${{ github.ref_name }}
29+
branch: lint-${{ github.run_number }}
30+
body:
31+
This pull request applies NPM's `prettier`
32+
formatting changes and will generate the sitemap. Commit ${{
33+
github.sha }}.
34+
labels: auto-generated
35+
reviewers: ${{ github.actor }}
36+
37+
- name: Store pull request number
38+
if: ${{ failure() }}
39+
run:
40+
echo "PR_NUMBER=${{
41+
steps.cpr.outputs.pull-request-number }}" >>
42+
$GITHUB_ENV

0 commit comments

Comments
 (0)