SSH Login #1
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: Run SSH Login | |
on: | |
schedule: | |
- cron: '0 11 */7 * *' # 每 7 天的上午 11 点运行 | |
workflow_dispatch: | |
jobs: | |
ssh-login-notification: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- 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 requests | |
- name: Run Python script | |
env: | |
SSH_INFO: ${{ secrets.SSH_INFO }} | |
PUSHPLUS_TOKEN: ${{ secrets.PUSHPLUS_TOKEN }} | |
run: python run.py |