-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore(ci): update submodule with token #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to directly add the submodules with https instead of converting in the CI ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok let's test it, keep us updated about the results ;)
@@ -22,7 +22,12 @@ jobs: | |||
|
|||
- run: git checkout chore/release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will be removed later by a PR from chore/release
to main
. But we need it for now, because the submodule is configured in chore/release
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks for the explanation :)
@@ -22,7 +22,12 @@ jobs: | |||
|
|||
- run: git checkout chore/release | |||
|
|||
- run: git submodule update --init --recursive | |||
- run: | | |||
git config --file .gitmodules --get-regexp url | while read url; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And actions/checkout@v2
has an issue with cloning submodules correctly, so this workaround seems to be needed.
I had only git submodule update --init --recursive
, but it failed because of lack of "permission". I suspect, the given github token by GitHub Action cannot touch other repositories than this. So this part applies the personal access token to the origin configuration, which gives more permission to touch other repositories.
@millotp I missed your comment. We can do that, but you will have to configure your local environment to work with git via http protocol as well, which is annoying. |
Ah true let's keep it that way then, thanks ! |
🧭 What and Why
Changes included:
On GitHub Action, submodules are not cloned correctly (https://github.com/algolia/api-clients-automation/runs/5373798260?check_suite_focus=true). This change seems promising.