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

Checkout is not cleaning properly after bad submodule added #933

Closed
dgerthe opened this issue Sep 27, 2022 · 0 comments · Fixed by #1196
Closed

Checkout is not cleaning properly after bad submodule added #933

dgerthe opened this issue Sep 27, 2022 · 0 comments · Fixed by #1196

Comments

@dgerthe
Copy link

dgerthe commented Sep 27, 2022

Steps to minimally reproduce:

  1. Create a submodule incorrectly by cloning a repo then using git add
  2. commit and push up that change, and there will be an expected error in checkout.
  3. Go to a completely separate branch (main) and run a workflow that uses actions/checkout
  4. notice the same error in the other branch because of it running git submodule foreach --recursive git config ... in the "Setting up auth step"

I realize (now) that adding a submodule in this way is not correct, but I did not expect that it would propagate to causing a problem in all separate branch's CI

I had to fix this issue by going to each separate runner and deleting the cloned repo.

Just an idea of a fix would be if error on setting up auth, have it fall back to cloning the repo

Note that on runners with older git version where actions/checkout uses the github REST API this issue is not seen because it is basically doing a fresh clone.

image

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 a pull request may close this issue.

1 participant