-
Notifications
You must be signed in to change notification settings - Fork 56
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
CI Permission issues in PRs from forks #221
Comments
We need the if condition on line 166 for instance before line 163 as well. For at least one issue. Labs-Windows/.github/workflows/build.yml Lines 161 to 167 in ed6bd23
|
According to the docs, the value of I've confirmed this in #222, we'll need to use a different environment variable that tell us if the branch being merged is from a fork. @michael-hawker Any feedback or direction? Since this changes when packages are auto-published. |
This might be one of the fixes we're looking for: dorny/test-reporter#168 |
@Arlodotexe exactly the So by adding the if condition to this it won't try and add the source and use the unavailable token. |
Doing this adds another (potential?) problem - any PRs that come from a fork won't be published to nuget as part of build validation. We still need to clearly define where/when we want publishing the nuget package to happen. |
Synced offline, clarified how the If need be, we can look at an alternate test reporter now that we're a public repo: #72 @Sergio0694 FYI, just in case you need to add it to the GitHub org. |
After a lot of digging, it looks like we can do this by using 2 separate jobs: 1 that assumes an insecure context and runs builds, and a second that takes the result of the build and runs in a secure context, allowing us to write tags, make comments, report test results, etc. https://securitylab.github.com/research/github-actions-preventing-pwn-requests |
Describe the bug
When someone forks the repo and creates a PR, GitHub Actions doesn't run as expected. Instead, it throws errors at us such as:
Resource not accessible by integration
in theexperiment
job.Error: No test report files were found
in theBuild-WinUI-2
andBuild-WinUI-3
jobs.Steps to reproduce
Expected behavior
CI should pass if changes are valid
Screenshots
Code Platform
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
Potentially helpful resources:
Notes to assignees
We should be able to safely fix this by branching main and changing the
build.yml
there, forking the repo, and making a PR to that new branch. That'll cause it to run our modifiedbuild.yml
against the forked branch.Help us help you
Yes, I'd like to be assigned to work on this item.
The text was updated successfully, but these errors were encountered: