forked from dejikcp/daohang
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.03 KB
/
update_dates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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