From 6523d3bc5dfc8fd2591ad799a4992c68fcc39f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=BA=E6=A2=B0=E5=B0=8F=E9=B8=BD?= <128568434+jixiexiaoge@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:07:53 +0800 Subject: [PATCH] Update sync-branches.yml new --- .github/workflows/sync-branches.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml index 153c212..9b794b3 100644 --- a/.github/workflows/sync-branches.yml +++ b/.github/workflows/sync-branches.yml @@ -10,18 +10,26 @@ jobs: runs-on: ubuntu-latest steps: + # 1. Checkout the target repository (your repo) - name: Checkout the target repository (your repo) uses: actions/checkout@v3 with: fetch-depth: 0 # 完整克隆仓库,确保所有历史记录 token: ${{ secrets.GH_TOKEN }} # 访问 GitHub 需要的令牌 + # 2. Add the source repository as a remote and fetch branches - name: Add the source repository as a remote and fetch branches run: | git remote add upstream https://github.com/ajouatom/openpilot.git git fetch upstream v8-wip2 v8-wip2-da-mazda_spam --no-tags + # 3. Push v8-wip2 branch to your repository + - name: Push v8-wip2 branch to your repository + run: | + git checkout -B v8-wip2 upstream/v8-wip2 + git push origin v8-wip2 --force + # 4. Push v8-wip2-da-mazda_spam branch to your repository - name: Push v8-wip2-da-mazda_spam branch to your repository run: | git checkout -B v8-wip2-da-mazda_spam upstream/v8-wip2-da-mazda_spam