Skip to content

Commit 004e2ab

Browse files
authored
Merge pull request #3557 from oliviassss/fix-deps-workflow
fix dependency review workflow
2 parents 2ce25f4 + 2ca0a68 commit 004e2ab

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/deps.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
name: "Dependency Review"
2-
on: [push, pull_request, workflow_dispatch]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- 'release-*'
7+
pull_request:
8+
workflow_dispatch:
9+
inputs:
10+
head_ref:
11+
description: 'HEAD git reference (tag/branch/commit) to analyze'
12+
required: true
13+
default: 'main'
14+
type: string
15+
base_ref:
16+
description: 'Base git reference (tag/branch/commit) to compare against head_ref'
17+
required: true
18+
default: 'main'
19+
type: string
320
permissions:
421
contents: read
522
jobs:
@@ -11,7 +28,10 @@ jobs:
1128
with:
1229
show-progress: false
1330
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v3
31+
uses: actions/dependency-review-action@v4
32+
with:
33+
base-ref: ${{ inputs.base_ref || github.event.pull_request.base.sha || 'main' }}
34+
head-ref: ${{ inputs.head_ref || github.event.pull_request.head.sha || github.ref }}
1535
govulncheck:
1636
runs-on: ubuntu-latest
1737
steps:

0 commit comments

Comments
 (0)