From 7df4cc0e94c14513eb57dbc76ddb6b5deafc8f83 Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Mon, 12 Jan 2026 20:21:55 -0500 Subject: [PATCH] feat(ci): add Copybara sync workflow for monorepo integration --- .github/workflows/copybara-sync.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/copybara-sync.yaml diff --git a/.github/workflows/copybara-sync.yaml b/.github/workflows/copybara-sync.yaml new file mode 100644 index 0000000..083d80c --- /dev/null +++ b/.github/workflows/copybara-sync.yaml @@ -0,0 +1,28 @@ +name: Copybara Sync to Monorepo + +on: + push: + branches: [main] + pull_request_target: + types: [opened, synchronize, reopened] + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }} + + - name: Sync to Monorepo + uses: olivr/copybara-action@v1.2.5 + with: + ssh_key: ${{ secrets.COPYBARA_SSH_KEY }} + access_token: ${{ secrets.MONOREPO_SYNC_TOKEN }} + sot_repo: OpenRouterTeam/python-sdk + destination_repo: OpenRouterTeam/openrouter-web + workflow: push + push_move: '||sdks/python||**' + push_exclude: '.github/workflows/copybara-sync.yaml' + copybara_options: ${{ github.event_name == 'pull_request_target' && '--force' || '' }}