format.yml 922 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: format
  2. on:
  3. push:
  4. branches-ignore:
  5. - production
  6. pull_request:
  7. branches-ignore:
  8. - production
  9. workflow_dispatch:
  10. workflow_run:
  11. workflows: ["sdk"]
  12. types:
  13. - completed
  14. jobs:
  15. format:
  16. runs-on: blacksmith-4vcpu-ubuntu-2404
  17. if: github.event.workflow_run.conclusion == 'success'
  18. permissions:
  19. contents: write
  20. steps:
  21. - name: Checkout repository
  22. uses: actions/checkout@v4
  23. with:
  24. token: ${{ secrets.GITHUB_TOKEN }}
  25. repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
  26. ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
  27. - name: Setup Bun
  28. uses: ./.github/actions/setup-bun
  29. - name: run
  30. run: |
  31. ./script/format.ts
  32. env:
  33. CI: true
  34. PUSH_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}