Skip to content

Commit

Permalink
Add pr-ci-triggers workflow
Browse files Browse the repository at this point in the history
Added the pr-ci-triggers github workflow to print out available
vendors CIs trigger phrases.
  • Loading branch information
abdallahyas committed Dec 7, 2021
1 parent ff8c2f1 commit 2b3f2e1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/pr-ci-triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
pull_request_target:

jobs:
vendors-ci-triggers-list:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v5
env:
MESSAGE: |-
Thanks for your PR,
To run vendors CIs use one of:
* `/test-all`: To run all tests for all vendors.
* `/test-e2e-all`: To run all E2E tests for all vendors.
* `/test-e2e-nvidia-all`: To run all E2E tests for NVIDIA vendor.
To skip the vendors CIs use one of:
* `/skip-all`: To skip all tests for all vendors.
* `/skip-e2e-all`: To skip all E2E tests for all vendors.
* `/skip-e2e-nvidia-all`: To skip all E2E tests for NVIDIA vendor.
Best regards.
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log("${{ env.MESSAGE }}")
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "${{ env.MESSAGE }}"
})
2 changes: 1 addition & 1 deletion ci/examples/jenkins/sriov-network-operator-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
failure-status: "Build Failed, comment `/test-e2e-all`, /test-e2e-nvidia-all, or `/test-all` to retrigger"
error-status: "Build Failed, comment `/test-e2e-all`, /test-e2e-nvidia-all, or `/test-all` to retrigger"
status-context: '{project} CI'
trigger-phrase: ".*/test-(all|e2e-all|e2e-nvidia-all(,| |$)).*"
trigger-phrase: "^(?!Thanks for your PR).*/test-(all|e2e-all|e2e-nvidia-all(,| |$)).*"
white-list:
- '*'
white-list-target-branches:
Expand Down

0 comments on commit 2b3f2e1

Please sign in to comment.