Skip to content

Baidu Tieba Auto Sign #701

Baidu Tieba Auto Sign

Baidu Tieba Auto Sign #701

Workflow file for this run

name: 'Baidu Tieba Auto Sign'
on:
push:
branches:
- main
schedule:
- cron: '15 0 * * *'
- cron: '0 1 * * *'
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: |
python -m pip install --upgrade pip
pip install requests # requests 模块
- name: Run check-in
run: |
python main.py --login_cookie "$LOGIN_COOKIE" --auth_cookie "$AUTH_COOKIE" >> run.log
env:
LOGIN_COOKIE: ${{ secrets.LOGIN_COOKIE }}
AUTH_COOKIE: ${{ secrets.AUTH_COOKIE }}
- name: Append Success Log #追加成功日志
run: |
echo "$(date +%Y-%m-%d\ %H:%M:%S) - 签到成功" >> run.log
- name: Upload log #上传日志
uses: actions/upload-artifact@v2
with:
name: logs
path: run.log
- name: Push log #更新日志
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: auto-checkin
branch: main