From dc72fe9140dc27f7046fde563f932de16c040e26 Mon Sep 17 00:00:00 2001 From: Valentin Matton Date: Wed, 30 Aug 2023 18:35:55 +0200 Subject: [PATCH] wip --- .github/workflows/deployment.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 8d19bf96..d2dd2293 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -106,24 +106,29 @@ jobs: airflow_conn_pg = TF_OUTPUTS["airflow_conn_pg"]["value"] public_ip = TF_OUTPUTS["public_ip"]["value"] + print(f"::add-mask::{airflow_conn_s3}") print(f"AIRFLOW_CONN_S3={airflow_conn_s3}") + print(f"::add-mask::{airflow_conn_pg}") print(f"AIRFLOW_CONN_PG={airflow_conn_pg}") print(f"SERVER_PUBLIC_IP={public_ip}") EOF - )" "${TF_OUTPUTS}" >> "${GITHUB_ENV}" + )" "${TF_OUTPUTS}" >> "${GITHUB_OUTPUT}" - name: set up ssh agent env: - SERVER_PUBLIC_IP: ${{ env.server_public_ip }} - SSH_AUTH_SOCK: /tmp/ssh_agent.sock + SERVER_PUBLIC_IP: ${{ steps.set-outputs.outputs.server_public_ip }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | - mkdir -p /home/runner/.ssh - ssh-keyscan "${SERVER_PUBLIC_IP}" >> /home/runner/.ssh/known_hosts - echo "${SSH_PRIVATE_KEY}" >> /home/runner/.ssh/key - chmod 600 /home/runner/.ssh/key - ssh-agent -a "${SSH_AUTH_SOCK}" > /dev/null - ssh-add /home/runner/.ssh/key + mkdir -p ~/.ssh + echo "${SSH_PRIVATE_KEY}" >> ~/.ssh/key + chmod 600 ~/.ssh/key + cat >> ~/.ssh/config << EOF + Host staging + HostName "${SERVER_PUBLIC_IP}" + User root + IdentityFile ~/.ssh/key + StrictHostKeyChecking no + EOF # - name: start services # env: