Add a sync from gerrit workflow

Change-Id: Idbefebd0263eec8ed489329b91132d9609cf2709
diff --git a/.github/workflows/sync-to-gerrit.yaml b/.github/workflows/sync-to-gerrit.yaml
new file mode 100644
index 0000000..518a9c7
--- /dev/null
+++ b/.github/workflows/sync-to-gerrit.yaml
@@ -0,0 +1,27 @@
+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
+
+      - 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
\ No newline at end of file