Skip to content

Instantly share code, notes, and snippets.

@doutv
Last active April 18, 2024 13:19
Show Gist options
  • Save doutv/54098c2c283ed8141ba961c88a2d5bb0 to your computer and use it in GitHub Desktop.
Save doutv/54098c2c283ed8141ba961c88a2d5bb0 to your computer and use it in GitHub Desktop.
GitHub Actions Pull Private Git Submodule
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone main repository
uses: actions/checkout@v4
- name: Add SSH private keys for submodule repositories
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.READ_ONLY_DEPLOY_KEY }}
- name: Clone submodules
run: git submodule update --init --recursive --remote
@flopana
Copy link

flopana commented Apr 18, 2024

I think I found the cleanest solution to this so far

actions/checkout#287 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment