Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/copybara-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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
# For PRs, checkout the PR head to sync the actual changes
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/typescript-sdk
destination_repo: OpenRouterTeam/openrouter-web
workflow: push
push_move: '||sdks/typescript||**'
push_exclude: '.github/workflows/copybara-sync.yaml'
# For PRs, create a PR in monorepo; for pushes to main, push directly
copybara_options: ${{ github.event_name == 'pull_request_target' && '--force' || '' }}