Add support for multiple GitHub deploy key mappings with GitHub Actions#815
Add support for multiple GitHub deploy key mappings with GitHub Actions#815TrevorGibson-SR wants to merge 4 commits into
Conversation
…rwarding Add support for multiple GitHub deploy key mappings with GitHub Actions
| ici_forward_mount /home/runner/.gitconfig rw | ||
| ici_forward_mount /home/runner/.ssh rw |
There was a problem hiding this comment.
We cannot hardcode Gihub-specific paths.
|
Please try adding .gitconfig here: And why would we mount them rw? |
|
I think we could just add |
|
|
@TrevorGibson-SR: The latest version should copy |
|
To answer my question:
|
Proposed as a solution to #807
When cloning multiple private GitHub repositories with SSH, you can use the deploy key mapping feature of the webfactory/ssh-agent GitHub action to map specific SSH keys to their respective GitHub repositories. This works as intended when cloning in the main GitHub runner environment, but fails to translate over to the industrial_ci docker environment.
Webfactory/ssh-agent specifically calls this out and suggests to copy the
~/.sshdirectory and~/.gitconfigfile into the docker container to ensure the mappings are carried over. This change simply adds two new docker mount arguments to import the SSH configuration into the Docker container's build environment.