-
Notifications
You must be signed in to change notification settings - Fork 10
Description
- Handle submodules referring to private repos (ssh?)
If I remember correctly the GITHUB_TOKEN lacks permissions for private repositories.
Not all is lost though, checking the permissions of repo ("Full control of private repositories") when generating a new token at https://github.com/settings/tokens/new, and then overwriting the environment variable within Workflows that require more permissions should to the trick...
uses: domdere/git-submodule-action@master
env:
GITHUB_TOKEN: ${{ secrets.ALL_REPOS_TOKEN }}Note, above assumes that
https://github.com/<maintainer>/<repository>/settings/secretshas been setup with a secret namedALL_REPOS_TOKENcontaining the token generated from prompts followed at the previous link.
... SSH setup should only be required if those utilizing submodules are also using SSH URLs; in my experience GitHub automation doesn't support SSH URLs and their documentation, if I remember correctly, recommends HTTPS instead; even for their own domain.
Small aside; I think if line 37 entrypoint were...
git submodule update --init --merge --recursive --remote... it may eliminate the need for lines 38 through 40, though that may also download more than what's necessary to update the .gitmodules file and directory-links.