mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
ci: fix fmt
This commit is contained in:
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`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user