@@ -6,16 +6,21 @@ name: PR testing - if Go project
66on :
77 pull_request :
88 types : [opened, reopened, synchronize, ready_for_review]
9-
9+
1010jobs :
1111 lint :
12- if : github.event.pull_request.draft == false
1312 name : lint
1413 runs-on : ubuntu-latest
1514 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
1721 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
1924 id : gomod
2025 run : test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
2126 shell : bash
@@ -31,16 +36,21 @@ jobs:
3136 skip-go-installation : true # we wanna control the version of Go in use
3237
3338 test :
34- if : github.event.pull_request.draft == false
3539 name : ${{ matrix.os }}
3640 runs-on : ${{ matrix.os }}
3741 strategy :
3842 matrix :
3943 os : [ubuntu-latest, macos-latest, windows-latest]
4044 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
4251 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
4454 id : gomod
4555 run : test -e ./go.mod && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
4656 shell : bash
0 commit comments