Update sync-branches.yml
op
This commit is contained in:
parent
72c338c1ba
commit
1abc92c0f2
32
.github/workflows/sync-branches.yml
vendored
32
.github/workflows/sync-branches.yml
vendored
@ -20,78 +20,82 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
git config --global user.email "github-actions@github.com"
|
git config --global user.email "github-actions@github.com"
|
||||||
|
|
||||||
# Existing remotes and branches
|
# Existing remotes and branches
|
||||||
- name: Add remote for MoreTore/openpilot
|
- name: Add remote for MoreTore/openpilot
|
||||||
run: |
|
run: |
|
||||||
git remote add moretore https://github.com/MoreTore/openpilot.git
|
git remote add moretore https://github.com/MoreTore/openpilot.git
|
||||||
git fetch moretore mazda-frogpilot
|
git fetch moretore mazda-frogpilot
|
||||||
git fetch moretore mazda-frogpilot-0.9.6 # 同步 mazda-frogpilot-0.9.6 分支
|
git fetch moretore mazda-frogpilot-0.9.6 # 同步 mazda-frogpilot-0.9.6 分支
|
||||||
|
|
||||||
- name: Add remote for FrogAi/FrogPilot
|
- name: Add remote for FrogAi/FrogPilot
|
||||||
run: |
|
run: |
|
||||||
git remote add frogai https://github.com/FrogAi/FrogPilot.git
|
git remote add frogai https://github.com/FrogAi/FrogPilot.git
|
||||||
git fetch frogai
|
git fetch frogai
|
||||||
|
|
||||||
- name: Delete conflicting branch mazda-frogpilot if it exists
|
- name: Delete conflicting branch mazda-frogpilot if it exists
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/mazda-frogpilot" && git push origin --delete mazda-frogpilot || echo "No conflict with mazda-frogpilot"
|
git branch -r | grep "origin/mazda-frogpilot" && git push origin --delete mazda-frogpilot || echo "No conflict with mazda-frogpilot"
|
||||||
|
|
||||||
- name: Create and push mazda-frogpilot branch
|
- name: Create and push mazda-frogpilot branch
|
||||||
run: |
|
run: |
|
||||||
git checkout -b mazda-frogpilot moretore/mazda-frogpilot
|
git checkout -b mazda-frogpilot moretore/mazda-frogpilot
|
||||||
git push origin mazda-frogpilot
|
git push origin mazda-frogpilot
|
||||||
|
|
||||||
- name: Delete conflicting branch mazda-frogpilot-0.9.6 if it exists
|
- name: Delete conflicting branch mazda-frogpilot-0.9.6 if it exists
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/mazda-frogpilot-0.9.6" && git push origin --delete mazda-frogpilot-0.9.6 || echo "No conflict with mazda-frogpilot-0.9.6"
|
git branch -r | grep "origin/mazda-frogpilot-0.9.6" && git push origin --delete mazda-frogpilot-0.9.6 || echo "No conflict with mazda-frogpilot-0.9.6"
|
||||||
|
|
||||||
- name: Create and push mazda-frogpilot-0.9.6 branch
|
- name: Create and push mazda-frogpilot-0.9.6 branch
|
||||||
run: |
|
run: |
|
||||||
git checkout -b mazda-frogpilot-0.9.6 moretore/mazda-frogpilot-0.9.6
|
git checkout -b mazda-frogpilot-0.9.6 moretore/mazda-frogpilot-0.9.6
|
||||||
git push origin mazda-frogpilot-0.9.6
|
git push origin mazda-frogpilot-0.9.6
|
||||||
|
|
||||||
- name: Delete conflicting branch FrogPilot if it exists
|
- name: Delete conflicting branch FrogPilot if it exists
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/FrogPilot" && git push origin --delete FrogPilot || echo "No conflict with FrogPilot"
|
git branch -r | grep "origin/FrogPilot" && git push origin --delete FrogPilot || echo "No conflict with FrogPilot"
|
||||||
|
|
||||||
- name: Force fetch and reset FrogPilot branch from remote
|
- name: Force fetch and reset FrogPilot branch from remote
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout --orphan FrogPilot
|
git checkout --orphan FrogPilot
|
||||||
git reset --hard frogai/FrogPilot
|
git reset --hard frogai/FrogPilot
|
||||||
git push origin FrogPilot --force
|
git push origin FrogPilot --force
|
||||||
|
|
||||||
- name: Delete conflicting branch FrogPilot-Development if it exists
|
- name: Delete conflicting branch FrogPilot-Development if it exists
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/FrogPilot-Development" && git push origin --delete FrogPilot-Development || echo "No conflict with FrogPilot-Development"
|
git branch -r | grep "origin/FrogPilot-Development" && git push origin --delete FrogPilot-Development || echo "No conflict with FrogPilot-Development"
|
||||||
|
|
||||||
- name: Force fetch and reset FrogPilot-Development branch from remote
|
- name: Force fetch and reset FrogPilot-Development branch from remote
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout --orphan FrogPilot-Development
|
git checkout --orphan FrogPilot-Development
|
||||||
git reset --hard frogai/FrogPilot-Development
|
git reset --hard frogai/FrogPilot-Development
|
||||||
git push origin FrogPilot-Development --force
|
git push origin FrogPilot-Development --force
|
||||||
|
|
||||||
# New remotes and branches
|
# New remotes and branches
|
||||||
- name: Add remote for opgm/openpilot
|
- name: Add remote for opgm/openpilot
|
||||||
run: |
|
run: |
|
||||||
git remote add opgm https://github.com/opgm/openpilot.git
|
git remote add opgm https://github.com/opgm/openpilot.git
|
||||||
git fetch opgm staging
|
git fetch opgm staging
|
||||||
|
|
||||||
- name: Sync staging branch from opgm/openpilot
|
- name: Sync staging branch from opgm/openpilot
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/staging" && git push origin --delete staging || echo "No conflict with staging"
|
git branch -r | grep "origin/staging" && git push origin --delete staging || echo "No conflict with staging"
|
||||||
git checkout -b staging opgm/staging
|
git checkout -b staging opgm/staging
|
||||||
git push origin staging
|
git push origin staging
|
||||||
|
|
||||||
- name: Add remote for ajouatom/openpilot
|
- name: Add remote for ajouatom/openpilot
|
||||||
run: |
|
run: |
|
||||||
git remote add ajouatom https://github.com/ajouatom/openpilot.git
|
git remote add ajouatom https://github.com/ajouatom/openpilot.git
|
||||||
git fetch ajouatom carrot2-v6
|
git fetch ajouatom carrot2-v6
|
||||||
|
|
||||||
- name: Sync carrot2-v6 branch from ajouatom/openpilot
|
- name: Sync carrot2-v6 branch from ajouatom/openpilot
|
||||||
run: |
|
run: |
|
||||||
git branch -r | grep "origin/carrot2-v6" && git push origin --delete carrot2-v6 || echo "No conflict with carrot2-v6"
|
git branch -r | grep "origin/carrot2-v6" && git push origin --delete carrot2-v6 || echo "No conflict with carrot2-v6"
|
||||||
git checkout -b carrot2-v6 ajouatom/carrot2-v6
|
git checkout -b carrot2-v6 ajouatom/carrot2-v6
|
||||||
git push origin carrot2-v6
|
git push origin carrot2-v6
|
||||||
|
# Add remote for commaai/openpilot
|
||||||
|
- name: Add remote for commaai/openpilot
|
||||||
|
run: |
|
||||||
|
git remote add commaai https://github.com/commaai/openpilot.git
|
||||||
|
git fetch commaai master
|
||||||
|
git fetch commaai release3
|
||||||
|
# Sync master branch from commaai/openpilot to opmaster
|
||||||
|
- name: Sync master branch to opmaster
|
||||||
|
run: |
|
||||||
|
git branch -r | grep "origin/opmaster" && git push origin --delete opmaster || echo "No conflict with opmaster"
|
||||||
|
git checkout -b opmaster commaai/master
|
||||||
|
git push origin opmaster
|
||||||
|
# Sync release3 branch from commaai/openpilot to release3
|
||||||
|
- name: Sync release3 branch
|
||||||
|
run: |
|
||||||
|
git branch -r | grep "origin/release3" && git push origin --delete release3 || echo "No conflict with release3"
|
||||||
|
git checkout -b release3 commaai/release3
|
||||||
|
git push origin release3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user