ci: handle case where generate.yml fails better

This commit is contained in:
Aiden Cline
2025-12-18 14:33:40 -06:00
parent ecc5050838
commit 8d11df1b3b
3 changed files with 38 additions and 18 deletions

View File

@@ -3,12 +3,3 @@
import { $ } from "bun"
await $`bun run prettier --ignore-unknown --write .`
if (process.env["CI"] && (await $`git status --porcelain`.text())) {
await $`git config --local user.email "action@github.com"`
await $`git config --local user.name "GitHub Action"`
await $`git add -A`
await $`git commit -m "chore: format code"`
const branch = process.env["PUSH_BRANCH"]
await $`git push origin HEAD:${branch} --no-verify`
}