File tree 3 files changed +36
-28
lines changed
3 files changed +36
-28
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,8 @@ charset = utf-8
9
9
trim_trailing_whitespace = true
10
10
insert_final_newline = true
11
11
12
- [* .md ]
12
+ [* .{markdown,md} ]
13
13
trim_trailing_whitespace = false
14
+
15
+ [* .{yaml,yml} ]
16
+ indent_size = 2
Original file line number Diff line number Diff line change 1
1
name : free-programming-books-lint
2
-
3
- on : [push, pull_request]
4
-
2
+ on :
3
+ push :
4
+ pull_request :
5
5
jobs :
6
6
build :
7
-
7
+ permissions :
8
+ pull-requests : write
8
9
runs-on : ubuntu-latest
9
-
10
10
steps :
11
11
- uses : actions/checkout@v2
12
12
- name : Use Node.js
13
13
uses : actions/setup-node@v1
14
14
with :
15
15
node-version : ' 14.x'
16
- - run : npm install -g free-programming-books-lint
17
- - run : fpb-lint ./books/
18
- - run : fpb-lint ./casts/
19
- - run : fpb-lint ./courses/
20
- - run : fpb-lint ./more/
16
+ - run : |
17
+ git clone https://github.com/SethFalco/free-programming-books-lint.git
18
+ cd free-programming-books-lint
19
+ git checkout origin/multiple-dirs
20
+ npm i
21
+ npm i -g .
22
+ - run : fpb-lint books casts courses more
23
+ if : github.event_name == 'push'
24
+ - run : |
25
+ fpb-lint books casts courses more 2>&1 | tee output.log
26
+ result_code=${PIPESTATUS[0]}
27
+
28
+ if [ $result_code != 0 ]
29
+ then
30
+ gh pr review $PR --body "The build failed with the following output:
31
+ \`\`\`
32
+ $(cat output.log)
33
+ \`\`\`" --request-changes
34
+ else
35
+ gh pr review $PR --approve
36
+ fi
37
+
38
+ exit $result_code
39
+ if: github.event_name == 'pull_request'
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42
+ PR: ${{ github.event.pull_request.html_url }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments