From 18315578b5891d4ab28397b3cacbccf2a21d5e2d Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Wed, 4 Dec 2024 10:58:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=95=9C=E5=83=8F=E4=BB=93?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/process-apps.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/process-apps.yml b/.github/workflows/process-apps.yml index d741097c6..100e460e3 100644 --- a/.github/workflows/process-apps.yml +++ b/.github/workflows/process-apps.yml @@ -51,3 +51,31 @@ jobs: git rebase origin/custom || { echo "Rebase failed, trying to resolve"; git rebase --abort; git pull --rebase origin custom; } git push origin custom + + # 克隆目标仓库 + - name: Clone DPanel repository + run: | + git clone https://github.com/QYG2297248353/appstore-dpanle.git target-repo + + # 将 appstore 内容复制到目标仓库 + - name: Copy appstore to DPanel repository + run: | + if [ -d "target-repo/apps" ]; then + rm -rf target-repo/apps + fi + mkdir -p target-repo/apps + rsync -a appstore/ target-repo/apps/ + + # 提交并推送目标仓库的更改 + - name: Commit and push to DPanel repository + working-directory: target-repo + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + + git add . + git diff --cached --quiet || git commit -m "Synced apps from source repository via GitHub Actions" + + git push origin master