Files
openrouter-python-sdk-retry…/.github/workflows/copybara-sync.yaml
T

42 lines
1.2 KiB
YAML

name: Copybara Sync
on:
push:
branches: [main]
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
copybara:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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
push_move: '||sdks/python||**'
push_exclude: '.github/workflows/copybara-sync.yaml .github/workflows/sdk_publish.yaml'
trigger-sdk-regen:
needs: copybara
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Dispatch SDK regeneration
uses: actions/github-script@v7
with:
github-token: ${{ secrets.MONOREPO_SYNC_TOKEN }}
script: |
await github.rest.repos.createDispatchEvent({
owner: 'OpenRouterTeam',
repo: 'openrouter-web',
event_type: 'sdk-regen-python',
client_payload: { sha: context.sha }
});