File tree 1 file changed +20
-1
lines changed 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 71
71
# needs: check-if-allowed
72
72
outputs :
73
73
mend-report-file : ${{ steps.report.outputs.mend-report-file }}
74
+ mend-scan-result : ${{ steps.scan.outputs.mend-scan-result }}
74
75
steps :
75
76
- name : Checkout Repository
76
77
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84
85
run : jarsigner -verify wss-unified-agent.jar
85
86
86
87
- name : Scan and upload
88
+ id : scan
87
89
env :
88
90
WS_URL : " https://f5.whitesourcesoftware.com/agent"
89
91
WS_APIKEY_NGINX : ${{ secrets.WS_APIKEY_NGINX }}
@@ -110,9 +112,13 @@ jobs:
110
112
java -jar wss-unified-agent.jar -noConfig true -wss.url $WS_URL -apiKey $WS_APIKEY_NGINX -userKey $WS_USER_KEY -product $PRODUCT_NAME -project $PROJECT_NAME -d ./
111
113
exit_code=$?
112
114
115
+ echo "mend-scan-result=$(echo $exit_code)" >> $GITHUB_OUTPUT
113
116
echo -e "\nEXIT CODE is: $exit_code\n"
117
+
114
118
if (( exit_code == 254 )); then
115
- exit 254
119
+ printf "\nMend scan detected problems.\n"
120
+ exit 0
121
+ # exit 254
116
122
else
117
123
printf "\nMend scan completed successfully. Exiting with code = 0\n"
118
124
exit 0
@@ -136,3 +142,16 @@ jobs:
136
142
name : mend-scan-report
137
143
path : whitesource
138
144
retention-days : 14
145
+
146
+ - name : Final scan result
147
+ id : final
148
+ run : |
149
+ echo -e "\nEXIT CODE is: ${{ steps.scan.outputs.mend-scan-result }}\n"
150
+
151
+ if (( ${{ steps.scan.outputs.mend-scan-result }} == 254 )); then
152
+ printf "\nMend scan detected problems.\n"
153
+ exit 254
154
+ else
155
+ printf "\nMend scan completed successfully. Exiting with code = 0\n"
156
+ exit 0
157
+ fi
You can’t perform that action at this time.
0 commit comments