Run Login Script #5
This file contains hidden or 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 Login Script | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * 1" # 每个星期一运行一次 | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| login: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 仓库代码 | |
| uses: actions/checkout@v2 | |
| - name: 安装 Playwright 所需依赖 | |
| run: | | |
| npx playwright install-deps | |
| - name: 设置 Python 环境 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.10' | |
| - name: 安装依赖 | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install playwright aiofiles requests | |
| - name: Install Playwright Browsers # 安装浏览器 | |
| run: | | |
| playwright install | |
| - name: 运行登录脚本 | |
| env: | |
| TEL_TOK: ${{ secrets.TEL_TOK }} | |
| TEL_ID: ${{ secrets.TEL_ID }} | |
| KOY_ACC: ${{ secrets.KOY_ACC }} | |
| run: | | |
| python koyeb-login.py |