fix: exclude .speakeasy/ on import to prevent gen.lock conflicts

This commit is contained in:
Matt Apperson
2026-01-12 20:35:42 -05:00
parent 66d0a82776
commit 0aed928ed3
+9 -21
View File
@@ -1,4 +1,4 @@
name: Copybara Sync name: Copybara Sync to Monorepo
on: on:
push: push:
@@ -7,35 +7,23 @@ on:
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
jobs: jobs:
copybara: sync:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- uses: olivr/copybara-action@v1.2.5 - name: Sync to Monorepo
uses: olivr/copybara-action@v1.2.5
with: with:
ssh_key: ${{ secrets.COPYBARA_SSH_KEY }} ssh_key: ${{ secrets.COPYBARA_SSH_KEY }}
access_token: ${{ secrets.MONOREPO_SYNC_TOKEN }} access_token: ${{ secrets.MONOREPO_SYNC_TOKEN }}
sot_repo: OpenRouterTeam/python-sdk sot_repo: OpenRouterTeam/python-sdk
destination_repo: OpenRouterTeam/openrouter-web destination_repo: OpenRouterTeam/openrouter-web
workflow: push
push_move: '||sdks/python||**' push_move: '||sdks/python||**'
push_exclude: '.github/workflows/copybara-sync.yaml .github/workflows/sdk_publish.yaml' # Exclude .speakeasy/ to preserve monorepo's gen.lock (contains repo-specific git hashes)
push_exclude: '.github/workflows/copybara-sync.yaml,.speakeasy'
trigger-sdk-regen: copybara_options: ${{ github.event_name == 'pull_request_target' && '--force' || '' }}
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 }
});