Explorar o código

ci(auto-merge): 添加从main合并到base分支的自动合并工作流

添加新的工作流步骤,实现从main分支自动合并到base分支的功能
feige996 hai 6 meses
pai
achega
adffb24e4e
Modificáronse 1 ficheiros con 17 adicións e 18 borrados
  1. 17 18
      .github/workflows/auto-merge.yml

+ 17 - 18
.github/workflows/auto-merge.yml

@@ -7,6 +7,23 @@ on:
   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
   merge-to-wot-ui:
     name: Merge main into wot-ui
     runs-on: ubuntu-latest
@@ -115,24 +132,6 @@ jobs:
           git merge main --no-ff -m "Auto merge main into base-uview-plus"
           git push origin base-uview-plus
 
-  # merge-to-base-tm-ui:
-  #   name: Merge main into base-tm-ui
-  #   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-tm-ui
-  #       run: |
-  #         git config user.name "GitHub Actions"
-  #         git config user.email "actions@github.com"
-  #         git checkout base-tm-ui
-  #         git merge main --no-ff -m "Auto merge main into base-tm-ui"
-  #         git push origin base-tm-ui
-
   merge-to-base-skiyee-ui:
     name: Merge main into base-skiyee-ui
     runs-on: ubuntu-latest