Fixed known host creation (#202)

`~/.ssh` should exist for `file` provisioner.
This commit is contained in:
Fedor Korotkov 2025-01-06 14:35:10 -05:00 committed by GitHub
parent 2545826772
commit f1a9e22ed2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -69,6 +69,11 @@ build {
// Add GitHub to known hosts
// Similar to https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-ssh.sh
provisioner "shell" {
inline = [
"mkdir -p ~/.ssh"
]
}
provisioner "file" {
source = "data/github_known_hosts"
destination = "~/.ssh/known_hosts"
@ -134,7 +139,8 @@ build {
provisioner "shell" {
inline = [
"source ~/.zprofile",
"test -d /Users/runner"
"test -d /Users/runner",
"test -f ~/.ssh/known_hosts",
]
}
}