Skip to content

Commit 41c0cad

Browse files
committed
move nixbuild key to another path, configure ssh_config from file in repo
1 parent 92cb732 commit 41c0cad

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/actions/setup-nix/action.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ runs:
4141
- name: Configure SSH Keys
4242
shell: bash
4343
run: |
44-
mkdir -p ~/.ssh
45-
echo "${{ inputs.nixbuild_key }}" > ~/.ssh/id_ed25519
46-
chmod 600 ~/.ssh/id_ed25519
47-
echo -e "Host *\n\tStrictHostKeyChecking no" | sudo tee -a ~/.ssh/config > /dev/null
44+
echo "${{ inputs.nixbuild_key }}" | install -D -m 600 /dev/stdin ~/.ssh/nixbuild_key
45+
install -m 644 "${{ github.workspace }}/.github/assets/ssh-config" ~/.ssh/config
4846

.github/assets/ssh-config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Host eu.nixbuild.net
2+
IdentityFile ~/.ssh/nixbuild_key
3+
Host *
4+
StrictHostKeyChecking no

0 commit comments

Comments
 (0)