carrot/.github/workflows/sync-branches.yml
2024-12-02 10:30:29 +08:00

43 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Sync Branches
on:
schedule:
# 每天10点UTC你可以根据需要调整时区
- cron: '0 10 * * *'
workflow_dispatch: # 允许手动启动工作流
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout the main repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"
- name: Add remote for MoreTore/openpilot
run: |
git remote add moretore https://github.com/MoreTore/openpilot.git
git fetch moretore mazda-frogpilot-dev
- name: Add remote for FrogAi/FrogPilot
run: |
git remote add frogai https://github.com/FrogAi/FrogPilot.git
git fetch frogai
- name: Create and push mazda-frogpilot-dev branch
run: |
git checkout -b mazda-frogpilot-dev moretore/mazda-frogpilot-dev
git push origin mazda-frogpilot-dev
- name: Create and push FrogPilot branch
run: |
git checkout -b FrogPilot frogai/FrogPilot
git push origin FrogPilot