Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Aug 30, 2023
1 parent 2e5e9a9 commit dc72fe9
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dc72fe9

Please sign in to comment.