-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom ssh key setup to fix actions (#1097)
* Add custom ssh key setup to fix actions * add ssh key to test.yml * Update .github/actions/setup-ssh/action.yml Co-authored-by: Simon <footless@gmail.com> * formatting? Co-authored-by: Justin Thompson <justin@weave.works> Co-authored-by: Simon <footless@gmail.com>
- Loading branch information
1 parent
2f4c835
commit 0ae045d
Showing
5 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Setup SSH' | ||
description: 'Setup SSH keys and known hosts' | ||
inputs: | ||
ssh-private-key: | ||
description: 'ssh keys to load' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up ssh agent | ||
uses: webfactory/ssh-agent@v0.5.2 | ||
with: | ||
ssh-private-key: ${{ inputs.ssh-private-key }} | ||
- name: Add known_hosts | ||
shell: bash | ||
run: | | ||
mkdir -p ~/.ssh | ||
touch ~/.ssh/known_hosts | ||
ssh-keygen -R github.com | ||
cat > ~/.ssh/known_hosts <<- EOM | ||
# github.com:22 SSH-2.0-babeld-a73e1397 | ||
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== | ||
# github.com:22 SSH-2.0-babeld-a73e1397 | ||
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= | ||
# github.com:22 SSH-2.0-babeld-a73e1397 | ||
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl | ||
EOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters