sdk.yml 967 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: sdk
  2. on:
  3. push:
  4. branches-ignore:
  5. - production
  6. pull_request:
  7. branches-ignore:
  8. - production
  9. workflow_dispatch:
  10. jobs:
  11. format:
  12. runs-on: blacksmith-4vcpu-ubuntu-2404
  13. permissions:
  14. contents: write
  15. steps:
  16. - name: Checkout repository
  17. uses: actions/checkout@v4
  18. with:
  19. token: ${{ secrets.GITHUB_TOKEN }}
  20. - name: Setup Bun
  21. uses: ./.github/actions/setup-bun
  22. - name: run
  23. run: |
  24. bun ./packages/sdk/js/script/build.ts
  25. (cd packages/opencode && bun dev generate > ../sdk/openapi.json)
  26. if [ -z "$(git status --porcelain)" ]; then
  27. echo "No changes to commit"
  28. exit 0
  29. fi
  30. git config --local user.email "[email protected]"
  31. git config --local user.name "GitHub Action"
  32. git add -A
  33. git commit -m "chore: regen sdk"
  34. git push --no-verify
  35. env:
  36. CI: true