Skip to content

Commit

Permalink
Create update-readme.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xpko authored Dec 13, 2024
1 parent ffd865b commit 08ce3c0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update README Directory Index

on:
push:
branches:
- main # 根据您的默认分支名称调整
schedule:
- cron: '0 0 * * 7' # 每周一次(可选)

jobs:
update-readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # 指定 Python 版本

- name: Install dependencies
run: |
# 如果未来需要安装依赖,可以在这里添加,例如:
# pip install -r requirements.txt
echo "No additional dependencies required."
- name: Run directory index script
run: python generate_directory_index.py

- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "🛠️ 自动更新目录索引"
file_pattern: "README.md"
# 可以根据需要配置更多选项,例如分支

0 comments on commit 08ce3c0

Please sign in to comment.