Skip to content

Commit 2497db7

Browse files
committed
chore: use pr target
Risky business. Should be fine though and means PRs will get the bot comments properly.
1 parent d452ad1 commit 2497db7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/diff-dependencies.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: Dependency Diff
22

33
on:
4-
pull_request:
4+
pull_request_target:
5+
branches:
6+
- main
57

68
jobs:
79
build-main:
810
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
913
steps:
1014
- name: Checkout
1115
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -27,9 +31,13 @@ jobs:
2731
path: '*.tgz'
2832
build-pr:
2933
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
3036
steps:
3137
- name: Checkout
3238
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
with:
40+
ref: ${{ github.event.pull_request.head.sha }}
3341
- name: Use Node
3442
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3543
with:
@@ -54,6 +62,7 @@ jobs:
5462
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5563
with:
5664
fetch-depth: 0
65+
ref: ${{ github.event.pull_request.head.sha }}
5766
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
5867
with:
5968
name: base-packages
@@ -63,7 +72,7 @@ jobs:
6372
name: source-packages
6473
path: ./source-packages
6574
- name: Create Diff
66-
uses: ./
75+
uses: e18e/action-dependency-diff@main
6776
with:
6877
base-packages: ./base-packages/*.tgz
6978
source-packages: ./source-packages/*.tgz

0 commit comments

Comments
 (0)