mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-05 13:10:31 +08:00
feat: add copybara sync workflow for monorepo integration
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
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 }
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user