-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][ci] Skip detecting changed files in fork repositories #22567
[improve][ci] Skip detecting changed files in fork repositories #22567
Conversation
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.
The problem with the changes in this PR is that it would make it harder to develop the workflow in a public forked repository.
We should first investigate if there's a way to add permissions to the workflow. I'll provide more details soon.
Is there a way where explicit job permissions specified with https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs would address the issue? |
The main affect is the PRs that only modify the documents will still trigger the unit tests. However, as the On the other hand, without this PR or another solution, the development in a private fork could be very hard. A PR needs to modify the workflow or the master branch needs to include a commit that removes these workflows to have tests executed.
Technically it's right. But the |
there's no need to modify the paths-filter action when defining GitHub Actions workflow or job permissions. It's also possible that private repositories have a setting that makes the default permissions just work without any changes. Explained in "Enforcing a policy for workflow permissions in your enterprise":
|
I also found another permission issue in the Semantic Pull Request / Check pull request title workflow though it does not block the development.
![]() Mark this PR as drafted first because I don't have much time on it. As a workaround to unblock the development, I will commit this patch in an independent development branch in the private forked repository. |
experiment in #22568 in draft mode |
Motivation
In a private fork repository, the precondition workflow of a PR will always fail due to the lack of the permission to fetch the content of that PR.
Modifications
Only run the "Detect changed files" step and steps that depend on that step in the Apache repo.
Verifying this change
After applying this patch, the precondition workflows succeeded and the tests were executed.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: