29 lines
888 B
YAML
29 lines
888 B
YAML
name: Sync Branch
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 10 * * *' # 每天 UTC 10 点运行
|
|
workflow_dispatch: # 允许手动触发
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout the target repository (your repo)
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # 完整克隆仓库,确保所有历史记录
|
|
token: ${{ secrets.GH_TOKEN }} # 访问 GitHub 需要的令牌
|
|
|
|
- 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
|
|
|
|
|
|
- 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
|
|
git push origin v8-wip2-da-mazda_spam --force
|