feat!: run on push and checkout release PR head commit#67
Merged
sparten11740 merged 10 commits intomasterfrom Dec 10, 2025
Merged
feat!: run on push and checkout release PR head commit#67sparten11740 merged 10 commits intomasterfrom
sparten11740 merged 10 commits intomasterfrom
Conversation
2bd1dd0 to
fb55b2c
Compare
165e269 to
fea6c27
Compare
fea6c27 to
ea085f9
Compare
mvayngrib
approved these changes
Dec 10, 2025
| sha, | ||
| }) | ||
| } catch (e) { | ||
| if (e instanceof Error && e.message.includes('Reference already exists')) { |
Contributor
There was a problem hiding this comment.
non-blocking: they don't provide an error code or something?
Collaborator
Author
There was a problem hiding this comment.
there might be one, checking
Collaborator
Author
There was a problem hiding this comment.
unfortunately no, this is the whole body they return:
{
"message": "Reference already exists",
"documentation_url": "https://docs.github.com/rest/git/refs#create-a-reference",
"status": "422"
}
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.
This refactors the publish action to be able to run on push in the context of the base branch. It identifies the commit's corresponding pull request to checkout its head commit. Most of our repositories are configured to delete PR branches after merging, which stops us from checking out the head SHA directly.
We need to filter a bit different to avoid running to often (e.g. on push to irrelevant PR branches). The following worked well in the test repo:
Test Plan
Successful run in https://github.com/ExodusMovement/actions-playground/actions/runs/20093513534/job/57646239041