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

Try out the new input submodules #176

Closed
ericsciple opened this issue Mar 5, 2020 · 17 comments
Closed

Try out the new input submodules #176

ericsciple opened this issue Mar 5, 2020 · 17 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@ericsciple
Copy link
Contributor

Collecting feedback for the new input submodules.

Use actions/checkout@master. Refer here for usage.

SSH support landing in master soon (tomorrow).

Will update the tag v2 after collecting feedback. Likely next week.

@peaceiris
Copy link

@ericsciple
Copy link
Contributor Author

Also seeking feedback on this proposed change #178 to convert SSH URLs to HTTPS when an ssh-key is not supplied.

@m-hilgendorf
Copy link

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

@m-hilgendorf
Copy link

@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.

@sjackman
Copy link

sjackman commented Mar 6, 2020

I'd appreciate a configuration option to specify a list of submodules to checkout:
git submodule update --init module-a module-b

@vadi2
Copy link

vadi2 commented Mar 10, 2020

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

@ericsciple
Copy link
Contributor Author

@vadi2 can you try setting fetch-depth: 0

@vadi2
Copy link

vadi2 commented Mar 10, 2020

That worked: https://github.com/Mudlet/Mudlet/runs/498213902?check_suite_focus=true

@ericsciple
Copy link
Contributor Author

FYI input ssh-key also added in master now

@jef
Copy link
Contributor

jef commented Mar 12, 2020

An input submodules has been added now. I merged to master, try it out and let me know. Collecting feedback and will update the v2 tag 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.

@edoardocavazza
Copy link

It seems that submodules are in detached HEAD state, is this the correct behaviour?

@vadi2
Copy link

vadi2 commented Mar 13, 2020

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 repo-sync/pull-request#17

@ziocleto
Copy link

[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!

@ziocleto
Copy link

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.

@Jake-Shadle
Copy link

@gokaygurcan
Copy link

Works perfect ^_^ Thanks!

/cc @bas

@ericsciple
Copy link
Contributor Author

Thanks all for the feedback! I updated V2 to include the recent submodule/SSH changes from master.

ashwinvis added a commit to exabl/snek5000-abl that referenced this issue May 11, 2020
ashwinvis added a commit to exabl/snek5000-abl that referenced this issue May 11, 2020
Did not work:
- Trying with 0 fetch depth Ref: actions/checkout#176 (comment)
- Use GITHUB_ACTIONS_PAT as a token: but it was used by the old eturb repo!

What worked: create new personal access token
- Generate: https://github.com/settings/tokens
- And add the secret: https://github.com/exabl/snek5000-abl/settings/secrets/new
kevinrue added a commit to kevinrue/COVID-19-website that referenced this issue May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants