diff options
| author | Dax Raad <[email protected]> | 2025-12-09 19:41:17 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-12-09 19:41:23 -0500 |
| commit | 1efdceaf1010c8db21d8b9ef2ec213eba7472dd5 (patch) | |
| tree | 3a28c19ee94c7ecd27015f480117db76eca73282 /.github/workflows/generate.yml | |
| parent | 632a0fe00990d22ea30ebdcf1321524027bd0d70 (diff) | |
| download | opencode-1efdceaf1010c8db21d8b9ef2ec213eba7472dd5.tar.gz opencode-1efdceaf1010c8db21d8b9ef2ec213eba7472dd5.zip | |
ci: combine sdk and format workflows into single generate workflow
Diffstat (limited to '.github/workflows/generate.yml')
| -rw-r--r-- | .github/workflows/generate.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 000000000..326090f7a --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,38 @@ +name: generate + +on: + push: + branches-ignore: + - production + pull_request: + branches-ignore: + - production + workflow_dispatch: + +jobs: + generate: + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} + + - name: Setup Bun + uses: ./.github/actions/setup-bun + + - name: Generate SDK + run: | + bun ./packages/sdk/js/script/build.ts + (cd packages/opencode && bun dev generate > ../sdk/openapi.json) + bun x prettier --write packages/sdk/openapi.json + + - name: Format + run: ./script/format.ts + env: + CI: true + PUSH_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }} |
