Files
aiot-uniapp/.github/workflows/auto-merge.yml
feige996 adffb24e4e ci(auto-merge): 添加从main合并到base分支的自动合并工作流
添加新的工作流步骤,实现从main分支自动合并到base分支的功能
2025-11-03 16:51:49 +08:00

152 lines
4.5 KiB
YAML

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
merge-to-wot-ui:
name: Merge main into wot-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 wot-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout wot-ui
git merge main --no-ff -m "Auto merge main into wot-ui"
git push origin wot-ui
merge-to-i18n:
name: Merge main into i18n
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 i18n
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout i18n
git merge main --no-ff -m "Auto merge main into i18n"
git push origin i18n
merge-to-base-sard-ui:
name: Merge main into base-sard-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-sard-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-sard-ui
git merge main --no-ff -m "Auto merge main into base-sard-ui"
git push origin base-sard-ui
merge-to-base-uv-ui:
name: Merge main into base-uv-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-uv-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-uv-ui
git merge main --no-ff -m "Auto merge main into base-uv-ui"
git push origin base-uv-ui
merge-to-base-uview-pro:
name: Merge main into base-uview-pro
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-uview-pro
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-uview-pro
git merge main --no-ff -m "Auto merge main into base-uview-pro"
git push origin base-uview-pro
merge-to-base-uview-plus:
name: Merge main into base-uview-plus
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-uview-plus
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-uview-plus
git merge main --no-ff -m "Auto merge main into base-uview-plus"
git push origin base-uview-plus
merge-to-base-skiyee-ui:
name: Merge main into base-skiyee-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-skiyee-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-skiyee-ui
git merge main --no-ff -m "Auto merge main into base-skiyee-ui"
git push origin base-skiyee-ui