Skip to content

Commit 5ee4449

Browse files
committed
ci(npm-run-package): run on push instead of pull_request_target
This lets us use the correct branch filter (`pull_request_target` only allows to filter by PR base branch, not by PR branch). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f0275c4 commit 5ee4449

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.github/workflows/npm-run-package.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
name: 'npm run package'
22
# Main use case: repackage when Dependabot updates a dependency
33
on:
4-
pull_request_target:
5-
types:
6-
- opened
7-
- reopened
8-
- synchronize
9-
paths:
10-
- package.json
11-
- package-lock.json
4+
push:
125
branches:
136
- 'dependabot/**'
147
workflow_dispatch:
@@ -21,13 +14,13 @@ on:
2114
jobs:
2215
npm-run-package-and-push: # make sure build/ci work properly
2316
runs-on: ubuntu-latest
24-
if: ${{ github.event_name }} == 'workflow_dispatch' || ${{ github.event.pull_request.head.repo.owner.login }} == 'git-for-windows'
17+
if: github.event_name == 'workflow_dispatch' || github.event.repository.owner.login == 'git-for-windows'
2518
environment: git-for-windows-ci-push
2619
steps:
2720
- uses: actions/checkout@v3
2821
with:
29-
repository: ${{ github.event.pull_request.head.repo.full_name }}
30-
ref: ${{ inputs.branch }}${{ github.event.pull_request.head.ref }}
22+
repository: ${{ github.event.repository.full_name }}
23+
ref: ${{ inputs.branch }}${{ github.event.ref }}
3124
token: ${{ secrets.GIT_FOR_WINDOWS_CI_PUSH }}
3225
- run: npm ci
3326
- run: npm run build

0 commit comments

Comments
 (0)