-
Notifications
You must be signed in to change notification settings - Fork 262
Only run check-binary-size workflow for PRs against master #709
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,12 @@ name: Check binary size | |
|
||
on: | ||
pull_request_target: | ||
# HACK(jubilee): something broke the distributed LLVM libso and I don't know what. | ||
branches: [] | ||
# - master | ||
branches: | ||
- master | ||
|
||
# Remove all permissions for the workflow to increase security; the individual jobs | ||
# below specify the exact permissions they need | ||
permissions: {} | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the jobs specify permissions then do they not strip permissions from the jobs? Because specifying any one permission removes all others. In either case it seems somewhat irrelevant. It's a false safety if a permission later in the job can be readded, no? Please be more precise in what we are achieving here. What is the permission we are preventing from being misused? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have extended the PR description to explain this. This requires that every job explicitly needs to list permissions it needs, and prevents that in the future by accident a job without |
||
|
||
# Both the "measure" and "report" jobs need to know this. | ||
env: | ||
|
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.
What is the motivation for the change to this filter? This sure looks like adding a value to an empty array, which seems to increase the number of possibilities. I'm not entirely sure if I understand what this did anymore and the GitHub Actions docs don't provide enough info for me to understand how Actions interprets an empty array here either, so I am not convinced this change is good.
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.
Ah, the answer is that the filter that matches nothing instead matches everything. Great.
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.
I don't have any direct connection to GitHub. I can only tell them that the same way you can, through https://github.com/orgs/community/discussions I assume. There is actually an existing discussion about it: https://github.com/orgs/community/discussions/158135 (not sure if other duplicate ones exist as well)