Skip to content

Commit 5143af3

Browse files
committed
ci: revert sync-lockfile to PR-only trigger (push to protected branches not allowed)
1 parent a5a75c5 commit 5143af3

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

.github/workflows/sync-lockfile.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,19 @@ name: Sync Lockfile
33
on:
44
pull_request:
55
paths: ["package.json"]
6-
push:
7-
branches: [main, master]
8-
paths: ["package.json"]
96

107
permissions:
118
contents: write
129

1310
jobs:
1411
sync:
15-
if: >
16-
github.event_name == 'push' ||
17-
(github.event_name == 'pull_request' &&
18-
github.event.pull_request.user.login == 'dependabot[bot]' &&
19-
github.event.pull_request.state == 'open')
12+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.state == 'open'
2013
runs-on: ubuntu-latest
2114
timeout-minutes: 10
2215
steps:
2316
- uses: actions/checkout@v6
2417
with:
25-
ref: ${{ github.event_name == 'push' && github.ref || github.head_ref }}
18+
ref: ${{ github.head_ref }}
2619
token: ${{ secrets.GITHUB_TOKEN }}
2720

2821
- uses: oven-sh/setup-bun@v2
@@ -39,5 +32,5 @@ jobs:
3932
exit 0
4033
fi
4134
git commit -m "chore: sync bun.lock"
42-
git pull --rebase origin ${{ github.event_name == 'push' && github.ref_name || github.head_ref }}
35+
git pull --rebase origin ${{ github.head_ref }}
4336
git push

0 commit comments

Comments
 (0)