SSH Connect #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SSH Connect | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 9 */7 * *' # 每天午夜执行,可以根据需要修改 cron 表达式 | |
jobs: | |
connect: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install paramiko | |
pip install requests | |
- name: Run SSH connection script | |
env: | |
ACCOUNTS: ${{ secrets.ACCOUNTS_JSON }} | |
run: python ssh.py |