Skip to content

Koyeb Auto Login

Koyeb Auto Login #44

Workflow file for this run

name: Koyeb Auto Login
on:
workflow_dispatch:
schedule:
- cron: '0 0 12,25 * *' # 每月12号和25号运行
jobs:
playwright-login:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 设置 Python 环境
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
# 安装依赖
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install playwright
playwright install # 安装浏览器依赖
# 执行登录任务
- name: Run Playwright script
env:
KOYEB_EMAIL: ${{ secrets.KOYEB_EMAIL }}
KOYEB_PASSWORD: ${{ secrets.KOYEB_PASSWORD }}
run: python koyeb_login.py
# 配置 Git 用户信息
- name: Configure Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
# 提交更改
- name: Commit changes
run: |
git add last_login_date.txt
git commit -m "Update last login date"
# 推送更改到远程仓库
- name: Push changes
run: git push