Skip to content

Update Domain Dates #21

Update Domain Dates

Update Domain Dates #21

Workflow file for this run

name: Update Domain Dates
on:
schedule:
- cron: '0 0 * * *' # 每天运行一次
workflow_dispatch: # 允许手动触发
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write # 添加写入权限
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub Token
- 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 requests pyyaml
- name: Run update script
run: python update_dates.py
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add _config.yaml
git commit -m "Update domain registration dates" || echo "No changes to commit"
git push