File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1919 with :
2020 token : ${{ secrets.GITHUB_TOKEN }}
2121 repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
22- ref : ${{ github.event.pull_request.head.sha || github.sha }}
22+ ref : ${{ github.event.pull_request.head.ref || github.ref_name }}
2323
2424 - name : Setup Bun
2525 uses : ./.github/actions/setup-bun
2929 ./script/format.ts
3030 env :
3131 CI : true
32+ PUSH_BRANCH : ${{ github.event.pull_request.head.ref || github.ref_name }}
Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ if (process.env["CI"] && (await $`git status --porcelain`.text())) {
99 await $ `git config --local user.name "GitHub Action"`
1010 await $ `git add -A`
1111 await $ `git commit -m "chore: format code"`
12- await $ `git push --no-verify`
12+ const branch = process . env [ "PUSH_BRANCH" ]
13+ await $ `git push origin HEAD:${ branch } --no-verify`
1314}
You can’t perform that action at this time.
0 commit comments