Skip to content

Commit 9e8bbdd

Browse files
Change to checkout action
1 parent 95b912d commit 9e8bbdd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

trivy/action.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ runs:
1818
fetch-depth: 0
1919

2020
- name: "Checkout Target Branch"
21-
run: git checkout ${{ github.base_ref }}
22-
shell: bash
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
22+
with:
23+
ref: ${{ github.base_ref }}
2324

2425
- name: "Scan Target Branch"
2526
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
@@ -35,9 +36,11 @@ runs:
3536
scan-ref: .
3637
severity: ${{ inputs.severities }}
3738

38-
- name: "Checkout current branch"
39-
run: git checkout -f $GITHUB_SHA
40-
shell: bash
39+
- name: Checkout current commit
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
41+
with:
42+
ref: ${{ github.sha }}
43+
clean: false
4144

4245
- name: "Scan Current Branch"
4346
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0

0 commit comments

Comments
 (0)