blob: ee64d7c99569def2144f6b790169a72ea71d2ea9 [file]
name: Sync Ceres Solver from Gerrit
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout GitHub Mirror
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Pull from Gerrit and Push to GitHub
env:
GERRIT_URL: https://ceres-solver.googlesource.com/ceres-solver
run: |
git remote add gerrit "$GERRIT_URL"
git fetch gerrit --prune --tags
git push origin "+refs/remotes/gerrit/*:refs/heads/*"
git push origin --tags --force