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 628c3c5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/pr-ci-triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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,\n
To run vendors CIs use one of:\n
* `/test-all`: To run all tests for all vendors.\n
* `/test-e2e-all`: To run all E2E tests for all vendors.\n
* `/test-e2e-nvidia-all`: To run all E2E tests for NVIDIA vendor.\n
\n
To skip the vendors CIs use one of:\n
* `/skip-all`: To skip all tests for all vendors.\n
* `/skip-e2e-all`: To skip all E2E tests for all vendors.\n
* `/skip-e2e-nvidia-all`: To skip all E2E tests for NVIDIA vendor.\n
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 628c3c5

Please sign in to comment.