Skip to content

Commit ecc5f05

Browse files
committed
Add conditional checks for dependency review steps based on event type
1 parent 4ab1e1b commit ecc5f05

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/dependency-review.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ jobs:
1313
with:
1414
fetch-depth: 0
1515
- name: "Get the first commit SHA"
16+
if: github.event_name == 'workflow_dispatch'
1617
id: first-commit
1718
run: echo "first_commit_sha=$(git rev-list --max-parents=0 HEAD)" >> $GITHUB_ENV
1819
- name: 'Dependency Review'
20+
if: github.event_name == 'workflow_dispatch'
1921
uses: actions/dependency-review-action@v4
2022
with:
2123
base-ref: ${{ env.first_commit_sha }}
2224
head-ref: ${{ github.ref }}
2325
show-openssf-scorecard: true
2426
vulnerability-check: true
2527
license-check: true
28+
- name: 'Dependency Review'
29+
if: github.event_name == 'pull_request'
30+
uses: actions/dependency-review-action@v4
31+
with:
32+
show-openssf-scorecard: true
33+
vulnerability-check: true
34+
license-check: true

0 commit comments

Comments
 (0)