-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grant kick off / restart github actions workflow permissions to members #15659
Comments
Followed up in https://github.com/orgs/community/discussions/49688 to see how other projects solve this problem. |
Hi @chaochn47 , I've been pinged in the discussion you mentioned.
So in a nutshell, this workflow is triggered everytime an issue is created, but some steps are ran only if it should based on a condition on the issue name. And the issue could also be closed automatically after the workflow has ran. |
Thanks @gusmith-ambiata for providing such detailed instructions!! I will give it a shot in my personal public repository. Use cases:
The input will be issue title like Are GITHUB_TOKEN permissions permissive or restricted in ref. |
@serathius I think get a minimal example working. chaochn47/etcd-issues#2 (comment). It would require workflows have write permissions to the repository. Could you please share your thoughts if this workaround sounds good to you? /cc @ahrtr |
Sorry but I should not give write permissions to workflows. This causes a security issue as we have custom workers for ARM that would become a security concern. |
Just for documentation, you may be able to assign permissions to the token in the workflow: |
Thanks @gusmith-ambiata for the constructive input!! We could set the default permissions to workflows to "restricted" one and only configure a job in a workflow (for example
https://github.com/chaochn47/etcd-issues/blob/main/.github/workflows/rerun-failed-job.yaml#L14-L16 This is the example after making the above change. chaochn47/etcd-issues#2 (comment) Does it sound good to you after the optimization from security perspective? @serathius @ahrtr |
I guess the proposed approach is not a security best practice for etcd project since malicious users can abuse its usage. Once ETCD as a kubernetes SIG is executed and we can reply on prow bot to fulfill the feature request like the issue title mentioned. |
Agreed, and in the chance that doesn't go ahead we can consider running our own prow & bot instance. I'm working with CNCF on getting us some more on demand infra here #15953 via Equinix Metal initially just for our arm64 runners but we can expand in future if necessary. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
Closing - This is now working via Now etcd members and reviewers can trigger and re-trigger tests using slash commands without having to wait for a maintainer, or force push from contributor. There is further work to be done about considering more of a shift from github actions to prow jobs but that will be tracked separately, initial discussion is happening under: kubernetes/k8s.io#6102 |
What would you like to be added?
Follow up to #15593 (comment)
Need to figure out how to do that, one way would be to adopt K8s bot but that comes with it's own downsides.
Why is this needed?
Would be great reward
The text was updated successfully, but these errors were encountered: