Skip to content

Commit f030e7b

Browse files
committed
[CI] Do not run Trivy scan by default (1.0.x branch)
To get around recent TOOMANYREQUESTS from Trivy during DB download, this commit does the following: - removes the scan from ci-pr.yml altogether - makes scan optional (default false) for ci.yml
1 parent d8397fb commit f030e7b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/ci-pr.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,9 @@ jobs:
9999
-PspringPulsarVersion="$VERSION" \
100100
-PspringBootVersion="$BOOT_VERSION" \
101101
:runAllSampleTests
102-
scan:
103-
needs: [prerequisites]
104-
if: needs.prerequisites.outputs.runjobs
105-
uses: ./.github/workflows/trivy-scan.yml
106-
107102
done:
108103
runs-on: ubuntu-latest
109-
needs: [ build_and_verify, check_samples, scan ]
104+
needs: [ build_and_verify, check_samples ]
110105
steps:
111106
- name: 'Done'
112107
shell: bash

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
paths-ignore:
88
- '.github/**'
99
workflow_dispatch:
10+
inputs:
11+
run-trivy-scan:
12+
description: 'Run Trivy scan ?'
13+
default: false
14+
required: false
15+
type: boolean
1016

1117
env:
1218
GCHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }}
@@ -89,7 +95,7 @@ jobs:
8995
:runAllSampleTests
9096
scan:
9197
needs: [prerequisites]
92-
if: needs.prerequisites.outputs.runjobs
98+
if: ${{ needs.prerequisites.outputs.runjobs && inputs.run-trivy-scan }}
9399
uses: ./.github/workflows/trivy-scan.yml
94100
deploy_artifacts:
95101
name: Deploy Artifacts (1.0.x)

0 commit comments

Comments
 (0)