mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
# Conflicts: # .github/workflows/selfdrive_tests.yaml # common/params.h # common/params_keys.h # common/params_pyx.pyx # docs/CARS.md # opendbc_repo # panda # selfdrive/car/tests/test_models.py # selfdrive/pandad/pandad.cc # selfdrive/pandad/pandad.h # selfdrive/selfdrived/selfdrived.py # selfdrive/ui/translations/main_ar.ts # selfdrive/ui/translations/main_de.ts # selfdrive/ui/translations/main_es.ts # selfdrive/ui/translations/main_fr.ts # selfdrive/ui/translations/main_ja.ts # selfdrive/ui/translations/main_ko.ts # selfdrive/ui/translations/main_pt-BR.ts # selfdrive/ui/translations/main_th.ts # selfdrive/ui/translations/main_tr.ts # selfdrive/ui/translations/main_zh-CHS.ts # selfdrive/ui/translations/main_zh-CHT.ts # system/athena/athenad.py # system/athena/manage_athenad.py # system/manager/manager.py # system/sentry.py # uv.lock Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master` Sync: `commaai/panda:master` into `sunnypilot/panda:master`
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
name: Sync comma's LFS
|
|
|
|
env:
|
|
LFS_URL: 'https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs'
|
|
LFS_PUSH_URL: 'ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git'
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
workflow_dispatch: # enables manual triggering
|
|
inputs:
|
|
upstream_branch:
|
|
default: 'master'
|
|
type: string
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
# Skip if PR is in draft mode
|
|
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)) && !github.event.pull_request.head.repo.fork
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: 'commaai/openpilot'
|
|
ref: ${{ inputs.upstream_branch }}
|
|
|
|
- name: LFS Fetch
|
|
run: |
|
|
git lfs fetch
|
|
|
|
- name: Set up Git
|
|
run: |
|
|
git config --global user.name 'GitHub Action'
|
|
git config --global user.email 'action@github.com'
|
|
|
|
- name: Set up SSH
|
|
uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
- name: Add GitLab public keys
|
|
run: |
|
|
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
|
|
|
- name: Ensure branch
|
|
run: |
|
|
if git symbolic-ref -q HEAD >/dev/null; then
|
|
echo "Already on a branch, proceeding with push"
|
|
else
|
|
echo "Detached HEAD state detected, creating temporary branch"
|
|
git checkout -b temp_branch
|
|
fi
|
|
|
|
- name: Update LFS Config
|
|
run: |
|
|
echo '[lfs]' > .lfsconfig
|
|
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
|
|
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
|
|
echo ' locksverify = false' >> .lfsconfig
|
|
|
|
- name: Push LFS
|
|
id: sync-and-commit
|
|
run: |
|
|
git lfs ls-files -l
|
|
git lfs push --all origin |