Skip to content
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

[Bug]: CI won't run on pull request created from forks #378

Open
beiertu-mms opened this issue Mar 1, 2024 · 5 comments · Fixed by #379
Open

[Bug]: CI won't run on pull request created from forks #378

beiertu-mms opened this issue Mar 1, 2024 · 5 comments · Fixed by #379
Labels
bug Something isn't working

Comments

@beiertu-mms
Copy link
Contributor

Expected Behavior

CI is triggered and run for pull requests, created from forks.

Actual Behavior

CI doesn't run for pull requests, created from forks.

See for example PR#377.

Steps to Reproduce

No response

Additional Information

Likely, the pull_request_target needs to be enabled with the CI.

@beiertu-mms beiertu-mms added the bug Something isn't working label Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

Thank you for taking your time to reach out. ❤️

@MediaMarktSaturn/software-supply-chain-security 👀

beiertu-mms added a commit that referenced this issue Mar 1, 2024
Add the `pull_request_target` trigger, so that pull requests from a
fork will also start a build. Otherwise they can't be verified.

A downside to this is that changes to the CI workflow can't be directly
verified on a pull request anymore without some workarounds, because
the CI will now run in the context of the base of the pull request.

Closes #378.

See also:
- https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
beiertu-mms added a commit that referenced this issue Mar 6, 2024
Add the `pull_request_target` trigger, so that pull requests from a
fork will also start a build. Otherwise they can't be verified.

A downside to this is that changes to the CI workflow can't be directly
verified on a pull request anymore without some workarounds, because
the CI will now run in the context of the base of the pull request.

Closes #378.

See also:
- https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target

Co-authored-by: Florian Heubeck <40993644+heubeck@users.noreply.github.com>
beiertu-mms added a commit that referenced this issue Mar 8, 2024
With the check using `github.ref` and dependabot as an actor, the build
is skipped. Previously, only the `push` trigger exists and will trigger
the workflow. As the `pull_request_target` has been added to also allow
pull requests from forks to trigger the workflow, the check needs to be
adjusted.

Related to:
- #378
@beiertu-mms beiertu-mms reopened this Mar 19, 2024
@beiertu-mms
Copy link
Contributor Author

Re-open, because the pull_request_target causes issue, when verifying dependency updates.
See also the description of #400.

beiertu-mms added a commit that referenced this issue Mar 19, 2024
The `GHFileNotFoundException` message has been changed and therefore
the test validation needs to be adjusted.

Also switch back `push` only trigger, because the`pull_request_target`
trigger runs on the main branch context, so it won't verify the actual
changes in a pull request.
Therefore, re-open the issue #378.
@bdhuppati
Copy link

any update on the above?

@beiertu-mms
Copy link
Contributor Author

any update on the above?

sorry, totally forgot about this issue 😅
sadly I don't have time and more importantly idea at the moment on how to fix this.

@heubeck
Copy link
Member

heubeck commented May 15, 2024

@bdhuppati, can you please create a fork, do some changes and create a PR?
Would be interested in the current behavior for external contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

3 participants