fix workflow execution for PRs coming from forks#10366
Merged
alexrashed merged 2 commits intomasterfrom Mar 1, 2024
Merged
Conversation
S3 Image Test Results (AMD64 / ARM64) 2 files 2 suites 3m 20s ⏱️ Results for commit 5b34be1. |
dominikschubert
approved these changes
Mar 1, 2024
Member
dominikschubert
left a comment
There was a problem hiding this comment.
LGTM, seems sensible. Probably not worth it to test it extensively before merging. We can just open a fork PR after the fact and iterate over it if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Unfortunately, it turns out that the fix to avoid the execution of test pipelines which rely on secrets implemented in #9383 is not correctly working, as we saw with the workflows executed on the following PRs:
It turns out that
github.repositoryevaluates to the PR target repo (which in this case islocalstack/localstack.However, we want to make sure that the source and the target of the PR are not the same repo.
This PR tries to fix this condition by checking the pull request head target as described in https://github.com/orgs/community/discussions/26829.
Changes
Testing
Unfortunately, this cannot really be tested properly as long as it's in a PR. Happy for any feedback / tips on how to test this though!