🧩手动更新任意收录插件 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 手动检测已登记插件(支持Gitee等)并强制更新zip | |
| # 运行:Actions页左上选脚本,右侧Run workflow填写后点绿按钮 | |
| name: "🧩手动更新任意收录插件" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repo-git: | |
| description: "插件名称或目录地址,多项可用','号分隔" | |
| required: true | |
| default: "https://github.com/user/repo" | |
| jobs: | |
| manual-update: | |
| name: "手动更新Git源插件" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "执行PHP脚本" | |
| run: | | |
| php AUTO-UPDATE.php ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.repo-git }} | |
| - name: "提交更新文件" | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: "Force update requested plugins in TESTORE.md & README.md" | |
| - name: "上传操作记录" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "updates-log" | |
| path: /home/runner/work/plugins/TMP/updates.log | |
| - name: "检测压缩文件" | |
| id: match-zips | |
| run: | | |
| echo A2C=$(find /home/runner/work/plugins/NEW -type f -name "[a-cA-C]*") >> $GITHUB_OUTPUT | |
| echo D2G=$(find /home/runner/work/plugins/NEW -type f -name "[d-gD-G]*") >> $GITHUB_OUTPUT | |
| echo H2L=$(find /home/runner/work/plugins/NEW -type f -name "[h-lH-L]*") >> $GITHUB_OUTPUT | |
| echo M2R=$(find /home/runner/work/plugins/NEW -type f -name "[m-rM-R]*") >> $GITHUB_OUTPUT | |
| echo S2Z=$(find /home/runner/work/plugins/NEW -type f -name "[s-zS-Z]*") >> $GITHUB_OUTPUT | |
| - name: "发布压缩包A-C" | |
| uses: svenstaro/upload-release-action@v2 | |
| if: steps.match-zips.outputs.A2C | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /home/runner/work/plugins/NEW/[a-cA-C]* | |
| tag: "plugins-A_to_C" | |
| overwrite: true | |
| file_glob: true | |
| - name: "发布压缩包D-G" | |
| uses: svenstaro/upload-release-action@v2 | |
| if: steps.match-zips.outputs.D2G | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /home/runner/work/plugins/NEW/[d-gD-G]* | |
| tag: "plugins-D_to_G" | |
| overwrite: true | |
| file_glob: true | |
| - name: "发布压缩包H-L" | |
| uses: svenstaro/upload-release-action@v2 | |
| if: steps.match-zips.outputs.H2L | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /home/runner/work/plugins/NEW/[h-lH-L]* | |
| tag: "plugins-H_to_L" | |
| overwrite: true | |
| file_glob: true | |
| - name: "发布压缩包M-R" | |
| uses: svenstaro/upload-release-action@v2 | |
| if: steps.match-zips.outputs.M2R | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /home/runner/work/plugins/NEW/[m-rM-R]* | |
| tag: "plugins-M_to_R" | |
| overwrite: true | |
| file_glob: true | |
| - name: "发布压缩包S-Z" | |
| uses: svenstaro/upload-release-action@v2 | |
| if: steps.match-zips.outputs.S2Z | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /home/runner/work/plugins/NEW/[s-zS-Z]* | |
| tag: "plugins-S_to_Z" | |
| overwrite: true | |
| file_glob: true |