Create blank.yml #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 Your Python Script | |
on: | |
push: | |
branches: | |
- main # 触发分支可以根据你的需求进行更改 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # 选择所需的 Python 版本 | |
- name: Install dependencies | |
run: pip install -r requirements.txt # 根据你的需求修改 requirements.txt 文件路径 | |
- name: Run Python script | |
env: | |
TELEGRAM_API_TOKEN: ${{ secrets.TELEGRAM_API_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
ACCOUNTS_AND_PASSWORDS: ${{ secrets.ACCOUNTS_AND_PASSWORDS }} | |
run: steps.py # 根据你的脚本文件名修改这里 |