27 lines
947 B
YAML
27 lines
947 B
YAML
name: Fix Python 3.10 on New Server
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
install-python310:
|
|
runs-on: saas
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Prepare SSH key
|
|
run: |
|
|
mkdir -p /root/.ssh
|
|
echo "$SSH_PRIVATE_KEY" > /root/.ssh/new_server_ed25519
|
|
chmod 600 /root/.ssh/new_server_ed25519
|
|
ssh -i /root/.ssh/new_server_ed25519 -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@172.30.18.199 "echo SSH_OK"
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.NEW_SERVER_SSH_KEY }}
|
|
|
|
- name: Install Python 3.10 on new server via SSH
|
|
run: |
|
|
scp -i /root/.ssh/new_server_ed25519 -o StrictHostKeyChecking=no scripts/install_python310.sh root@172.30.18.199:/tmp/install_python310.sh
|
|
ssh -i /root/.ssh/new_server_ed25519 -o StrictHostKeyChecking=no root@172.30.18.199 "bash /tmp/install_python310.sh"
|
|
timeout-minutes: 30
|