Skip to content

Commit 6862e9c

Browse files
committed
Dependency review improvements
1 parent 35d2b50 commit 6862e9c

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/dependency-review.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: "Dependency Review"
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [ "opened", "synchronize", "edited", "reopened" ]
6-
paths-ignore:
7-
- "docs/**"
6+
paths:
7+
- "*"
8+
- ".github/**"
89
push:
910
branches:
1011
- "**"
11-
paths-ignore:
12-
- "docs/**"
12+
paths:
13+
- "*"
14+
- ".github/**"
1315

1416
concurrency:
1517
group: "${{ github.workflow }}-${{ github.ref }}"
@@ -30,9 +32,18 @@ jobs:
3032
steps:
3133
- name: "Checkout"
3234
uses: "actions/checkout@v4"
35+
with:
36+
ref: "${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}"
3337

3438
- name: "Dependency Review"
3539
uses: "actions/dependency-review-action@v4"
40+
id: "dependency-review"
3641
with:
37-
base-ref: "${{ github.event.before }}"
38-
head-ref: "${{ github.sha }}"
42+
base-ref: "${{ github.event_name == 'push' && github.event.before || '' }}"
43+
head-ref: "${{ github.event_name == 'push' && github.sha || '' }}"
44+
45+
- name: "Show Review Results"
46+
if: "${{ always() }}"
47+
run: |
48+
echo "Licenses Denied: ${{ steps.dependency-review.outputs.licenses_denied }}"
49+
echo "Vulnerabilities: ${{ steps.dependency-review.outputs.vulnerabilities }}"

0 commit comments

Comments
 (0)