[improve][CI] Optimize "Pulsar Bot" workflow
move the filter from the build step to the build job
- only start the build job if the comment includes "/pulsarbot"
no need to checkout code
no need to run the tune VM action
@@ -21,29 +21,15 @@ name: Pulsar Bot
on:
issue_comment:
types: [created]
- pull_request:
- types: [closed]
-
-env:
- MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
jobs:
-
- action-runner:
- name:
+ pulsarbot:
runs-on: ubuntu-latest
- timeout-minutes: 120
-
+ timeout-minutes: 10
+ if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '/pulsarbot')
steps:
- - name: checkout
- uses: actions/checkout@v2
-
- - name: Tune Runner VM
- uses: ./.github/actions/tune-runner-vm
-
- name: Execute pulsarbot command
id: pulsarbot
- if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '/pulsarbot')
env:
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
uses: apache/pulsar-test-infra/pulsarbot@master
