|
1 | | -name: Run Python Script and Update README |
| 1 | +# name: Run Python Script and Update README |
2 | 2 |
|
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - pull_request: |
8 | | - branches: |
9 | | - - main |
10 | | - workflow_dispatch: |
| 3 | +# on: |
| 4 | +# push: |
| 5 | +# branches: |
| 6 | +# - main |
| 7 | +# pull_request: |
| 8 | +# branches: |
| 9 | +# - main |
| 10 | +# workflow_dispatch: |
11 | 11 |
|
12 | 12 |
|
13 | 13 |
|
14 | | -jobs: |
15 | | - run-script: |
16 | | - runs-on: ubuntu-latest |
17 | | - steps: |
18 | | - - name: Checkout main branch |
19 | | - uses: actions/checkout@v4 |
20 | | - with: |
21 | | - ref: "main" |
22 | | - fetch-depth: 0 |
23 | | - token: ${{ secrets.ATTICUS_PAT }} |
| 14 | +# jobs: |
| 15 | +# run-script: |
| 16 | +# runs-on: ubuntu-latest |
| 17 | +# steps: |
| 18 | +# - name: Checkout main branch |
| 19 | +# uses: actions/checkout@v4 |
| 20 | +# with: |
| 21 | +# ref: "main" |
| 22 | +# fetch-depth: 0 |
| 23 | +# token: ${{ secrets.ATTICUS_PAT }} |
24 | 24 |
|
25 | | - # 新增:创建并切换到CI分支 |
26 | | - - name: Checkout CI branch |
27 | | - run: | |
28 | | - git fetch origin |
29 | | - if git branch --list ci-auto-update; then |
30 | | - git checkout ci-auto-update |
31 | | - else |
32 | | - git checkout -b ci-auto-update |
33 | | - fi |
34 | | - git reset --hard origin/main |
| 25 | +# # 新增:创建并切换到CI分支 |
| 26 | +# - name: Checkout CI branch |
| 27 | +# run: | |
| 28 | +# git fetch origin |
| 29 | +# if git branch --list ci-auto-update; then |
| 30 | +# git checkout ci-auto-update |
| 31 | +# else |
| 32 | +# git checkout -b ci-auto-update |
| 33 | +# fi |
| 34 | +# git reset --hard origin/main |
35 | 35 |
|
36 | | - - name: Configuring git credentials |
37 | | - run: | |
38 | | - git config --global user.email "1831768457@qq.com" |
39 | | - git config --global user.name "Atticuszz" |
| 36 | +# - name: Configuring git credentials |
| 37 | +# run: | |
| 38 | +# git config --global user.email "1831768457@qq.com" |
| 39 | +# git config --global user.name "Atticuszz" |
40 | 40 |
|
41 | | - # 以下步骤保持不变,但是现在它们在CI分支上执行 |
42 | | - - name: Set up Python |
43 | | - uses: actions/setup-python@v5 |
44 | | - with: |
45 | | - python-version: "3.11" |
| 41 | +# # 以下步骤保持不变,但是现在它们在CI分支上执行 |
| 42 | +# - name: Set up Python |
| 43 | +# uses: actions/setup-python@v5 |
| 44 | +# with: |
| 45 | +# python-version: "3.11" |
46 | 46 |
|
47 | | - - name: Install dependencies |
48 | | - run: | |
49 | | - python -m pip install --upgrade pip |
50 | | - pip install useful-scripts pre-commit |
| 47 | +# - name: Install dependencies |
| 48 | +# run: | |
| 49 | +# python -m pip install --upgrade pip |
| 50 | +# pip install useful-scripts pre-commit |
51 | 51 |
|
52 | | - - name: Run pre-commit hooks |
53 | | - run: pre-commit run --all-files |
54 | | - continue-on-error: true |
| 52 | +# - name: Run pre-commit hooks |
| 53 | +# run: pre-commit run --all-files |
| 54 | +# continue-on-error: true |
55 | 55 |
|
56 | | - - name: Run the script for recently modified |
57 | | - run: markdown --root ${{ github.workspace }} modify_recent --output ${{ github.workspace }}/README.md --num_commits 15 --dir docs --title "## 最近修改" |
| 56 | +# - name: Run the script for recently modified |
| 57 | +# run: markdown --root ${{ github.workspace }} modify_recent --output ${{ github.workspace }}/README.md --num_commits 15 --dir docs --title "## 最近修改" |
58 | 58 |
|
59 | 59 |
|
60 | | - - name: Commit README changes |
61 | | - run: | |
62 | | - git add . |
63 | | - git commit -m "Ci workflows" || echo "No changes to commit" |
64 | | - git push origin ci-auto-update --force |
| 60 | +# - name: Commit README changes |
| 61 | +# run: | |
| 62 | +# git add . |
| 63 | +# git commit -m "Ci workflows" || echo "No changes to commit" |
| 64 | +# git push origin ci-auto-update --force |
65 | 65 |
|
66 | | - # 新增:创建或更新 PR 到主分支 |
67 | | - - name: Create Pull Request |
68 | | - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test' |
69 | | - uses: repo-sync/pull-request@v2 |
70 | | - with: |
71 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
72 | | - pr_title: "Update from CI" |
73 | | - pr_body: "This is an automated PR to update contents" |
74 | | - source_branch: "ci-auto-update" |
75 | | - destination_branch: "main" |
| 66 | +# # 新增:创建或更新 PR 到主分支 |
| 67 | +# - name: Create Pull Request |
| 68 | +# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test' |
| 69 | +# uses: repo-sync/pull-request@v2 |
| 70 | +# with: |
| 71 | +# github_token: ${{ secrets.GITHUB_TOKEN }} |
| 72 | +# pr_title: "Update from CI" |
| 73 | +# pr_body: "This is an automated PR to update contents" |
| 74 | +# source_branch: "ci-auto-update" |
| 75 | +# destination_branch: "main" |
0 commit comments