Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/HyejiYu/PatTurning
Browse files Browse the repository at this point in the history
  • Loading branch information
HyejiYu committed Nov 20, 2024
2 parents cd6be71 + 0d97720 commit f03e9c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/consumer-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ jobs:
GCE_IP: ${{ secrets.GCE_IP }}
GCE_USER: ${{ secrets.GCE_USER }}
GCE_SSH_PRIVATE_KEY: ${{ secrets.GCE_SSH_PRIVATE_KEY }}
GCE_SSH_PUBLIC_KEY: ${{ secrets.GCE_SSH_PUBLIC_KEY }}
GCE_USER_HOME: ${{ secrets.GCE_USER_HOME }}
run: |
mkdir -p ~/.ssh
echo "${GCE_SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
echo "${GCE_SSH_PUBLIC_KEY}" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/messagequeue/consumer/HomePlus_consumer.py" ${GCE_USER}@${GCE_IP}:${GCE_USER_HOME}/HomePlus_consumer.py
rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/messagequeue/consumer/Oasis_consumer.py" ${GCE_USER}@${GCE_IP}:${GCE_USER_HOME}/Oasis_consumer.py
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/dag-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ jobs:
GCE_IP: ${{ secrets.GCE_IP }}
GCE_USER: ${{ secrets.GCE_USER }}
GCE_SSH_PRIVATE_KEY: ${{ secrets.GCE_SSH_PRIVATE_KEY }}
GCE_SSH_PUBLIC_KEY: ${{ secrets.GCE_SSH_PUBLIC_KEY }}
GCE_AIRFLOW_HOME: ${{ secrets.GCE_AIRFLOW_HOME }}
run: |
mkdir -p ~/.ssh
echo "${GCE_SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa # SSH 키 권한 설정
echo "${GCE_SSH_PUBLIC_KEY}" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/HomePlus_dag.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/HomePlus_dag.py
rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/Oasis_dag.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/Oasis_dag.py
rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/requirements/modules.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/requirements/modules.py
Expand Down

0 comments on commit f03e9c8

Please sign in to comment.