GeezerVison is showing github.com — ci: fix fmt · tweet/opencode@d8401e1
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/format.yml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
18 | 18 | uses: actions/checkout@v4 |
19 | 19 | with: |
20 | 20 | token: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} |
| 22 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
21 | 23 |
|
22 | 24 | - name: Setup Bun |
23 | 25 | uses: ./.github/actions/setup-bun |
|
27 | 29 | ./script/format.ts |
28 | 30 | env: |
29 | 31 | CI: true |
30 | | - GITHUB_HEAD_REF: ${{ github.head_ref }} |
31 | | - GITHUB_REF_NAME: ${{ github.ref_name }} |
Collapse file
Copy file name to clipboardExpand all lines: script/format.ts +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,10 +5,9 @@ import { $ } from "bun" |
5 | 5 | await $`bun run prettier --ignore-unknown --write .` |
6 | 6 |
|
7 | 7 | if (process.env["CI"] && (await $`git status --porcelain`.text())) { |
8 | | - const branch = process.env["GITHUB_HEAD_REF"] || process.env["GITHUB_REF_NAME"] |
9 | 8 | |
10 | 9 | await $`git config --local user.name "GitHub Action"` |
11 | 10 | await $`git add -A` |
12 | 11 | await $`git commit -m "chore: format code"` |
13 | | - await $`git push origin HEAD:${branch} --no-verify` |
| 12 | + await $`git push --no-verify` |
14 | 13 | } |