-
Notifications
You must be signed in to change notification settings - Fork 415
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
[GHA] Specify permissions when deviating from defaults #2721
Conversation
The publish_website.yml workflow requires write permissions to 1. create new docusaurus versions by pushing a commit to `docusaurus-versions` branch 2. push new website to gh-pages
@CristianLara has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2721 +/- ##
=======================================
Coverage 99.98% 99.99%
=======================================
Files 203 203
Lines 18671 18671
=======================================
+ Hits 18669 18670 +1
+ Misses 2 1 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. AFAIK, the publish_website doesn't rely on secrets anymore (previously, docusaurus bot needed it, I think), so removing those also seems safe there.
@CristianLara merged this pull request in 37f3f7d. |
Summary: ## Context Duplicate of change made in botorch: pytorch/botorch#2721 ## Motivation The `publish_website.yml` workflow requires write permissions to 1. create new docusaurus versions by pushing a commit to `docusaurus-versions` branch 2. push new website to gh-pages This was not an issue in the fork that introduced these changes because Meta's organization / the official repo has more restrictive permissions than the defaults. More restrictive default permissions are definitely the way to go, here we elevate permissions only when necessary. Pull Request resolved: #3299 Test Plan: I made the default permissions in my fork more restrictive such that the same workflows would fail then verified that this change results in successful workflow runs. https://github.com/CristianLara/botorch/actions/runs/13107635487/job/36565023833 Reviewed By: Balandat Differential Revision: D69035808 Pulled By: CristianLara fbshipit-source-id: 1f663e79609ae1e7318d9be9b9b3bb16eee3e835
Motivation
The
publish_website.yml
workflow requires write permissions todocusaurus-versions
branchThis was not an issue in the fork that introduced these changes because Meta's organization / the official repo has more restrictive permissions than the defaults. More restrictive default permissions are definitely the way to go, here we elevate permissions only when necessary.
Test Plan
I made the default permissions in my fork more restrictive such that the same workflows would fail then verified that this change results in successful workflow runs. https://github.com/CristianLara/botorch/actions/runs/13107635487/job/36565023833