@@ -6,16 +6,21 @@ name: PR testing - if Go project
6
6
on :
7
7
pull_request :
8
8
types : [opened, reopened, synchronize, ready_for_review]
9
-
9
+
10
10
jobs :
11
11
lint :
12
- if : github.event.pull_request.draft == false
13
12
name : lint
14
13
runs-on : ubuntu-latest
15
14
steps :
16
- - name : Checkout repository
15
+ - if : " github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))"
16
+ id : should_run
17
+ name : Should Run
18
+ run : echo "::set-output name=shouldrun::true"
19
+ - if : steps.should_run.outputs.shouldrun == 'true'
20
+ name : Checkout repository
17
21
uses : actions/checkout@v2
18
- - name : Check if Go project and has go.mod
22
+ - if : steps.should_run.outputs.shouldrun == 'true'
23
+ name : Check if Go project and has go.mod
19
24
id : gomod
20
25
run : test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
21
26
shell : bash
@@ -31,16 +36,21 @@ jobs:
31
36
skip-go-installation : true # we wanna control the version of Go in use
32
37
33
38
test :
34
- if : github.event.pull_request.draft == false
35
39
name : ${{ matrix.os }}
36
40
runs-on : ${{ matrix.os }}
37
41
strategy :
38
42
matrix :
39
43
os : [ubuntu-latest, macos-latest, windows-latest]
40
44
steps :
41
- - name : Checkout repository
45
+ - if : " github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))"
46
+ id : should_run
47
+ name : Should Run
48
+ run : echo "::set-output name=shouldrun::true"
49
+ - if : steps.should_run.outputs.shouldrun == 'true'
50
+ name : Checkout repository
42
51
uses : actions/checkout@v2
43
- - name : Check if Go project and has go.mod
52
+ - if : steps.should_run.outputs.shouldrun == 'true'
53
+ name : Check if Go project and has go.mod
44
54
id : gomod
45
55
run : test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
46
56
shell : bash
0 commit comments