From ab8096fb4945e4d37f899b50a5665f05afdfaf05 Mon Sep 17 00:00:00 2001 From: shlu Date: Mon, 16 Dec 2024 00:29:19 +0800 Subject: [PATCH] Create update-readme-index.yml --- .github/workflows/update-readme-index.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update-readme-index.yml diff --git a/.github/workflows/update-readme-index.yml b/.github/workflows/update-readme-index.yml new file mode 100644 index 00000000..4ef20a95 --- /dev/null +++ b/.github/workflows/update-readme-index.yml @@ -0,0 +1,30 @@ +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.x' + + - 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"