-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
GH#354 Avoid auth configuration for submodules when settings.submodules is false #424
base: main
Are you sure you want to change the base?
GH#354 Avoid auth configuration for submodules when settings.submodules is false #424
Conversation
This should help with actions#354. The problem is that I have no idea whether such auth submodules configuration is required even when settings.submodules is false.
This reverts commit c764e5e.
Error: Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run format && npm run build Error: Process completed with exit code 1.
We've found a good workaround, which is to simply add the directory name for the private actions checkout to |
Github Actions checkout@v2 fails to properly cleanup state in self-hosted runners which leads to errors from prior CI runs. actions/checkout#385 Adding the created submodule directory to gitignore should hopefully prevent this from happening: actions/checkout#424 (comment).
Github Actions checkout@v2 fails to properly cleanup state in self-hosted runners which leads to errors from prior CI runs. actions/checkout#385 Adding the created submodule directory to gitignore should hopefully prevent this from happening: actions/checkout#424 (comment).
Please add |
I'm running with this merged into https://github.com/check-spelling/actions-checkout/releases/tag/v3 as part of check-spelling/check-spelling@407076c in order to resolve the problem that this PR fixes in repositories such as https://github.com/check-spelling/winget-cli/actions/runs/3570503478/attempts/1 -- with this applied, things are happy: https://github.com/check-spelling/winget-cli/actions/runs/3571395765/jobs/6003227245#step:2:1 I expect to leave this tag in place (and possibly pull in other things as needed) until it's merged into actions/checkout@v3 ... @cory-miller: what would it take to move this along? |
Can you incorporate the fix from #964 to address the merge conflict? Other than that LGTM. |
@cory-miller, I don't have write access to this PR, but I'm hosting a rebased version of the changes here: c12e728, you should be able to force push the branch to it. I've moved https://github.com/check-spelling/actions-checkout/releases/tag/v3 to that commit. |
Error: Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run format && npm run build Error: Process completed with exit code 1. Rebased PR from actions#424
This patch appears to solve the problems detailed in #354 and possibly #385.
The question is: is this the correct way to solve the problem? Not sure.
The conditions to reproduce the problem are the following:
actions/checkout
, etc...actions/checkout@v2
steps, one for the main project and one for the private shared actions repository.Something happens in the "Setting up auth" stage: the additional directory used for the private shared actions repository checkout within the existing project checkout (whatever that directory is called), is interpreted as a submodule (?) when running the auth helper
removeGitConfig()
and this results in the following error messages:Note that no repository involved has submodules here.
An alternative solution that seems to work is manual removal
of the private actions repository checkout directoryof the entire project checkout.UPDATE:
I see now that the git index is being updated with the shared actions checkout directory, even though I don't think I have done that explicitly.
Here's most of the failing checkout messages: