mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
ci: fix fmt
This commit is contained in:
parent
9a90939ac4
commit
076c8b2ca1
2 changed files with 4 additions and 2 deletions
3
.github/workflows/format.yml
vendored
3
.github/workflows/format.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./.github/actions/setup-bun
|
||||
|
|
@ -29,3 +29,4 @@ jobs:
|
|||
./script/format.ts
|
||||
env:
|
||||
CI: true
|
||||
PUSH_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ if (process.env["CI"] && (await $`git status --porcelain`.text())) {
|
|||
await $`git config --local user.name "GitHub Action"`
|
||||
await $`git add -A`
|
||||
await $`git commit -m "chore: format code"`
|
||||
await $`git push --no-verify`
|
||||
const branch = process.env["PUSH_BRANCH"]
|
||||
await $`git push origin HEAD:${branch} --no-verify`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue