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

context: opt-in pull request head ref #551

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Jan 13, 2025

related to

Using the /head ref for pull requests by default is problematic, as it fails to capture upstream changes in the target branch. This discrepancy might lead to different outcomes in CI runs compared to those obtained when running the same workflows against the target branch after merging a PR.

With this change, users will need to set the DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF=true environment variable in their workflows to opt in to tracking the HEAD of the development branch, rather than the merge branch that previews the changes after merging into the target branch.

cc @chandanpg

@crazy-max crazy-max requested a review from tonistiigi January 13, 2025 12:12
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch 2 times, most recently from 4aa93b9 to 042dcea Compare January 13, 2025 12:17
@crazy-max crazy-max marked this pull request as ready for review January 13, 2025 12:22
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch from 042dcea to 0f25bd7 Compare January 13, 2025 12:24
@tonistiigi
Copy link
Member

I assume this matches actions/checkout ?

@crazy-max
Copy link
Member Author

I assume this matches actions/checkout ?

Yes indeed

Verified

This commit was signed with the committer’s verified signature.
crazy-max CrazyMax
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch from 0f25bd7 to e02b7d7 Compare January 15, 2025 09:09
@crazy-max crazy-max merged commit e46ec80 into docker:main Jan 15, 2025
61 checks passed
@crazy-max crazy-max deleted the git-pr-head-ref-optin branch January 15, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants