From d870dc1b856879264e22c1e7915f88b30e7bf164 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 11 Nov 2025 09:16:14 +0800 Subject: [PATCH] =?UTF-8?q?ci(workflow):=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=90=88=E5=B9=B6main=E5=88=B0=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=88=86=E6=94=AF=E7=9A=84=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-merge.yml | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..f3086b5 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,50 @@ +name: Auto Merge Main to Other Branches + +on: + push: + branches: + - main + workflow_dispatch: # 手动触发 + +jobs: + merge-to-base: + name: Merge main into base + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GH_TOKEN_AUTO_MERGE }} + + - name: Merge main into base + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git checkout base + git merge main --no-ff -m "Auto merge main into base" + git push origin base + + - name: Merge base into base-login + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git checkout base-login + git merge base --no-ff -m "Auto merge base into base-login" + git push origin base-login + + - name: Merge base into base-i18n + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git checkout base-i18n + git merge base --no-ff -m "Auto merge base into base-i18n" + git push origin base-i18n + + - name: Merge base into base-login-i18n + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git checkout base-login-i18n + git merge base --no-ff -m "Auto merge base into base-login-i18n" + git push origin base-login-i18n