From 9dad63a0e0321f735f45caae5041eb41bb2f94cc Mon Sep 17 00:00:00 2001 From: Mike Holloway Date: Tue, 7 Jan 2025 18:12:38 -0500 Subject: [PATCH] Deploy Key gitea actions secret --- .gitea/workflows/linode.yml | 1 + extensions/molecule/linode/create.yml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/linode.yml b/.gitea/workflows/linode.yml index 9280392..8a4a570 100644 --- a/.gitea/workflows/linode.yml +++ b/.gitea/workflows/linode.yml @@ -26,6 +26,7 @@ jobs: continue-on-error: true run: | export TARGET_IP_ADDRESS=$(tofu output -raw act_worker_ip_address) + export ACT_RUNNER_DEPLOY_KEY=${{ secrets.ACT_RUNNER_DEPLOY_KEY }} cd ${{ gitea.workspace}}/podman-host/extensions molecule test -s linode working-directory: "${{ gitea.workspace }}/podman-host/.gitea/tofu" diff --git a/extensions/molecule/linode/create.yml b/extensions/molecule/linode/create.yml index 5379195..69136f3 100644 --- a/extensions/molecule/linode/create.yml +++ b/extensions/molecule/linode/create.yml @@ -13,7 +13,10 @@ tasks: - name: Confirm we can reach command: - cmd: "ssh -o StrictHostKeyChecking=no -T root@{{ lookup('env', 'TARGET_IP_ADDRESS') }}" + cmd: | + echo {{ lookup('env', 'ACT_RUNNER_DEPLOY_KEY') }} > ~/.ssh/id_ed25519 + ssh-add ~/.ssh/id_ed25519 + ssh -o StrictHostKeyChecking=no -T root@{{ lookup('env', 'TARGET_IP_ADDRESS') }} retries: 12 delay: 10 register: isping