From 7a1f04a0712dcd66d6737a07b0415788ceee09b5 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 28 Jan 2024 21:19:02 +0100 Subject: [PATCH] feat: add auth sock Signed-off-by: kjuulh --- crates/cuddle-ci/src/cuddle_releaser.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/cuddle-ci/src/cuddle_releaser.rs b/crates/cuddle-ci/src/cuddle_releaser.rs index 97eec3c..394e71d 100644 --- a/crates/cuddle-ci/src/cuddle_releaser.rs +++ b/crates/cuddle-ci/src/cuddle_releaser.rs @@ -80,10 +80,16 @@ impl MainAction for CuddleReleaser { let folder = client.host().directory(&self.folder); + let ssh_sock = std::env::var("SSH_AUTH_SOCK").context("SSH_AUTH_SOCK not set")?; + let cuddle_releaser = client .container() .from(cuddle_releaser_image) - .with_mounted_directory("/mnt/templates", folder); + .with_mounted_directory("/mnt/templates", folder) + .with_unix_socket( + ssh_sock.clone(), + client.host().unix_socket(ssh_sock.clone()), + ); cuddle_releaser .with_exec(vec![