It works well :tada:
log: https://github.com/peaceiris/hugo-test-project/runs/490347719?check_suite_focus=true#step:2:135
Also seeking feedback on this proposed change https://github.com/actions/checkout/pull/178 to convert SSH URLs to HTTPS when an ssh-key is not supplied.
What is the approach for checking out private submodules over SSH? That solution doesn't seem to work, unless I'm doing something totally off base here:
- name: checkout hack
run: git config --global url."https://username:${{ secrets.USER_PWD }}@github.com/".insteadOf "[email protected]:"
- uses: actions/checkout@master
with:
submodules: recursive
For all private submodules I receive:
##[error]fatal: repository 'https://github.com/user/repo.git/' not found
@ericsciple (apologies, I moved my comment here since it's more of an issue discussion than PR review)
what about git config --global url."https://github.com".insteadOf "[email protected]"
I tried that first. It only works for public submodules, the code I posted with username/password (or with a PAT) functions on a local machine. I've also tried this. No dice, I get error 400.
The only thing I have been able to get functioning is to do this, which is non-ideal for a number of reasons.
I'd appreciate a configuration option to specify a list of submodules to checkout:
git submodule update --init module-a module-b
Does not work for a submodule hosted on bitbucket.com, see https://github.com/Mudlet/Mudlet/runs/497081182?check_suite_focus=true:
HEAD is now at 77edfbc Merge 3082a1eca03e73f9e3141aa33297306ff9d73a60 into 24c22e0a7878984bc105db3048db1ace9730bff1
Temporarily overriding HOME='/home/runner/work/_temp/b6b02b9c-dabd-4a9d-8051-8686b731c8cc' before making global git config changes
/usr/bin/git config --global http.https://github.com/.extraheader AUTHORIZATION: basic ***
/usr/bin/git submodule sync
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1
Submodule '3rdparty/dblsqd' (https://bitbucket.org/pentacent/dblsqd-sdk-qt.git) registered for path '3rdparty/dblsqd'
Submodule '3rdparty/edbee-lib' (https://github.com/Mudlet/edbee-lib.git) registered for path '3rdparty/edbee-lib'
Submodule '3rdparty/lua_code_formatter' (https://github.com/martin-eden/lua_code_formatter.git) registered for path '3rdparty/lcf'
Submodule '3rdparty/qtkeychain' (https://github.com/Mudlet/qtkeychain.git) registered for path '3rdparty/qtkeychain'
Submodule '3rdparty/sparkle-glue' (https://github.com/Mudlet/mixing-cocoa-and-qt.git) registered for path '3rdparty/sparkle-glue'
Cloning into '/home/runner/work/Mudlet/Mudlet/3rdparty/dblsqd'...
Cloning into '/home/runner/work/Mudlet/Mudlet/3rdparty/edbee-lib'...
Cloning into '/home/runner/work/Mudlet/Mudlet/3rdparty/lcf'...
Cloning into '/home/runner/work/Mudlet/Mudlet/3rdparty/qtkeychain'...
Cloning into '/home/runner/work/Mudlet/Mudlet/3rdparty/sparkle-glue'...
##[error]error: Server does not allow request for unadvertised object 9e4b86b8c2beae6938893edec9466575656b0b30
Fetched in submodule path '3rdparty/dblsqd', but it did not contain 9e4b86b8c2beae6938893edec9466575656b0b30. Direct fetching of that commit failed.
Unsetting HOME override
Removed matchers: 'checkout-git'
##[error]The process '/usr/bin/git' failed with exit code 1
@vadi2 can you try setting fetch-depth: 0
FYI input ssh-key also added in master now
An input
submoduleshas been added now. I merged to master, try it out and let me know. Collecting feedback and will update thev2tag next week.Also I'm hoping to merge support for SSH soon.
This is awesome! I have been using with our org's private actions. Works great! Using via HTTPS and token.
It seems that submodules are in detached HEAD state, is this the correct behaviour?
I'm not sure if that's relevant to your work here, but in the end I had to revert to v1 anyway because this version was incompatible with https://github.com/repo-sync/pull-request/issues/17
[Sorry reposting here after seeing the note on the other thread]
I can give my feedback it's all good now on our end using @master, although we have an interesting case in which for some reason adding a fresh new submodule and using v2 won't work while it did work before with a submodule that was located on the root folder of the repo hmmm, anyway, all good now! Every submodule is working, please let us know when you'll have a tag ready so we can remove the dangerous master tag from CD/CI!
It seems that submodules are in detached HEAD state, is this the correct behaviour?
If you are running it into a CD/CI pipeline I think it's the correct state, you do not want your CD/CI pipeline to have writable access to the repositories.
Works perfect ^_^ Thanks!
/cc @bas
Thanks all for the feedback! I updated V2 to include the recent submodule/SSH changes from master.
Most helpful comment
Thanks all for the feedback! I updated V2 to include the recent submodule/SSH changes from master.