You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create new branch (feature-1) and commit code. GH action not run.
Create PR from feature-1 to main. GH action is run and successfully triggers CircleCI.
CircleCI run fails with the following message:
Using SSH Config Dir '/home/circleci/.ssh'
git version 2.35.1
Cloning git repository
Cloning into '.'...
Warning: Permanently added the ECDSA host key for IP address '140.82.113.3' to the list of known hosts.
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 25 (delta 5), reused 24 (delta 4), pack-reused 0
Receiving objects: 100% (25/25), 103.51 KiB | 20.70 MiB/s, done.
Resolving deltas: 100% (5/5), done.
Checking out branch
fatal: reference is not a tree: 7c9319c338312cd6720fc85e0d05263a65172370
exit status 128
$CIRCLE_SHA1 is set to 7c9319c338312cd6720fc85e0d05263a65172370 but that ref does not exist on the repo (running git log doesn't show that). I believe that ref is generated by the "fetch" phase of the checkout action with this command (taken from the details of the successful GH action):
Either the checkout phase of the CircleCI pipeline should use the refs/pull/1/merge ref directly rather than a hash, or the GH action should commit the new ref to the repo (if possible) or send over a different SHA1 so that the CircleCI pipeline can use $CIRCLE_SHA1 properly.
Worth noting that, after the Circle run failed and I restarted with SSh, when I run the git fetch command from the GH pipeline in the SSH container the git checkout --force -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1" command succeeds.
Is there an existing issue for this?
Current behavior
Triggering a CircleCI job against an opened PR sends over a SHA1 ref that CircleCI can't find.
Minimum reproduction code
https://github.com/tmountjr/l0-express
Steps to reproduce
feature-1
) and commit code. GH action not run.feature-1
tomain
. GH action is run and successfully triggers CircleCI.$CIRCLE_SHA1
is set to7c9319c338312cd6720fc85e0d05263a65172370
but that ref does not exist on the repo (runninggit log
doesn't show that). I believe that ref is generated by the "fetch" phase of the checkout action with this command (taken from the details of the successful GH action):Expected behavior
Either the checkout phase of the CircleCI pipeline should use the
refs/pull/1/merge
ref directly rather than a hash, or the GH action should commit the new ref to the repo (if possible) or send over a different SHA1 so that the CircleCI pipeline can use$CIRCLE_SHA1
properly.Worth noting that, after the Circle run failed and I restarted with SSh, when I run the
git fetch
command from the GH pipeline in the SSH container thegit checkout --force -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1"
command succeeds.GitHub Action Version
1.0.4
Other
CircleCI config.yml file:
Output of the
git log
command from a failed run (restarted with SSH):The text was updated successfully, but these errors were encountered: