File tree 1 file changed +27
-19
lines changed
1 file changed +27
-19
lines changed Original file line number Diff line number Diff line change 5
5
branches : [ master ]
6
6
7
7
jobs :
8
+ verify :
9
+ name : Verify format
10
+ runs-on : ubuntu-18.04
11
+ outputs :
12
+ skip-format : ${{ steps.check_format.outputs.skip-format }}
13
+ steps :
14
+ - name : Setup Go 1.x
15
+ uses : actions/setup-go@v2
16
+ with :
17
+ go-version : ^1.15
18
+ id : go
19
+ - uses : actions/checkout@v2
20
+ with :
21
+ fetch-depth : 0
22
+ - name : Check all
23
+ id : check_format
24
+ run : |
25
+ ./check_repo.sh
26
+ succeeded=$(echo "$?")
27
+ if [ "$succeeded" -ne 0 ]; then
28
+ echo "::set-output name=skip-format::true"
29
+ fi
30
+ env :
31
+ BRANCH_NAME : ${{ github.head_ref }}
32
+ CHANGE_TARGET : ${{ github.base_ref }}
8
33
format :
34
+ needs : verify
35
+ if : ${{ needs.verify.outputs.skip-format != 'true' }}
9
36
name : Format PR
10
37
runs-on : ubuntu-18.04
11
38
steps :
37
64
message : " [ga-format-pr] Run ./format_repo.sh to fix formatting"
38
65
add : " ."
39
66
cwd : " ."
40
- verify :
41
- name : Verify format
42
- runs-on : ubuntu-18.04
43
- steps :
44
- - name : Setup Go 1.x
45
- uses : actions/setup-go@v2
46
- with :
47
- go-version : ^1.15
48
- id : go
49
- - uses : actions/checkout@v2
50
- with :
51
- fetch-depth : 0
52
- - name : Check all
53
- working-directory : ./
54
- run : |
55
- ./check_repo.sh
56
- env :
57
- BRANCH_NAME : ${{ github.head_ref }}
58
- CHANGE_TARGET : ${{ github.base_ref }}
You can’t perform that action at this time.
0 commit comments