Skip to content

How to checkout a private submodule from a github action? #25516

Answered by oldskool
jaredly asked this question in Actions
Discussion options

You must be logged in to vote

You should be able to set a custom token when using the checkout action. So, if you have a token that you know will have access to both your current repo as well as the submodule(s), you can run a step like:

- uses: actions/checkout@v1
  with:
    token: ${{ secrets.ACCESS_TOKEN }}
    submodules: true

Which would use a secret called “ACCESS_TOKEN” (which you should then create in the repository that runs your workflow) to pull the repositories.

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yurist38
Comment options

@nobelwong
Comment options

Comment options

You must be logged in to vote
1 reply
@yurist38
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants