feature: add approve workflows action #3758
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BackGround
When contributors from outside contribute their first PR to volcano repo, the repo admin has to click the
approve and run
button to run the CI, even the approvers don't have the permissions to run the CIs when they are not repo admin. And the volcano-bot cannot automatically run CIs, because the bot usesprow
as the testing framework. Currentlyprow
uses k8s' own testing framework, and its integration with github workflow is not so good. So, inspired by this issue: kubernetes-sigs/prow#194, and this config: https://github.com/kubernetes-sigs/cluster-api/blob/main/.github/workflows/pr-gh-workflow-approve.yaml, we can add a action, when there isok-to-test
label in this first PR(which is already reviewed by reviewers), this github workflow can be ran to call other workflows. Therefore, approvers can have the right to run CIs, not only the repo admin.Testing
Test-1
Add
ok-to-test
label,Approve Workflow
action can run:And other workflows can run subsequently:
Test-2
Tag other labels, other workflows can't run, and
Approve Workflows
action is skippedTest-3
PR to non
release-**
andmaster
branch,ok-to-test
label is useless, only PR torelease-**
andmaster
branch is useful.