@@ -122,7 +122,7 @@ runs:
122122 shell : bash
123123
124124 - name : Scan results link
125- if : env.SCAN_EXIT_CODE == 0 || env.SCAN_EXIT_CODE = = 2
125+ if : env.SCAN_EXIT_CODE < = 2
126126 run : |
127127 echo -e "\033[36;1m-----------------------------\033[0m"
128128 echo -e "\033[36;1m View the full scan results -> \033[0m ${{ env.SCAN_CLOUD_LINK }}"
@@ -151,7 +151,19 @@ runs:
151151
152152 [View the full scan results](${{ env.SCAN_CLOUD_LINK }})
153153
154- - name : Comment PR on failure with results
154+ - name : Comment PR on warning
155+ uses : thollander/actions-comment-pull-request@8c77f42bbcc27c832a3a5962c8f9a60e34b594f3
156+ continue-on-error : true
157+ if : env.SCAN_EXIT_CODE == 1
158+ with :
159+ message : |
160+ 🟠 Soda scan completed with the following results:
161+
162+ ${{ steps.table.outputs.table }}
163+
164+ [View the full scan results](${{ env.SCAN_CLOUD_LINK }})
165+
166+ - name : Comment PR on failure
155167 uses : thollander/actions-comment-pull-request@8c77f42bbcc27c832a3a5962c8f9a60e34b594f3
156168 continue-on-error : true
157169 if : env.SCAN_EXIT_CODE == 2
@@ -163,23 +175,23 @@ runs:
163175
164176 [View the full scan results](${{ env.SCAN_CLOUD_LINK }})
165177
166- - name : Comment PR on fatal failure
178+ - name : Comment PR on scan errors
167179 uses : thollander/actions-comment-pull-request@8c77f42bbcc27c832a3a5962c8f9a60e34b594f3
168180 continue-on-error : true
169- if : env.SCAN_EXIT_CODE == 1 || env.SCAN_EXIT_CODE == 3
181+ if : env.SCAN_EXIT_CODE == 3
170182 with :
171183 message : |
172- 🔴 Soda scan failed. Check logs for more details.
184+ 🔴 Soda scan failed. Check the logs for more details.
173185
174186
175187 # 6. Post additional message to make it clear scan failed or not
176- - name : Fail Job if Soda Scan Failed
188+ - name : Fail job if Soda scan failed
177189 shell : bash
178190 if : env.SCAN_EXIT_CODE != 0
179191 run : |
180192 echo -e "\033[31;1;4mSoda Scan failed\033[0m" && exit ${{ env.SCAN_EXIT_CODE }}
181193
182- - name : Fail Job if Soda Scan Succeeded
194+ - name : Exit job if Soda scan succeeded
183195 shell : bash
184196 if : env.SCAN_EXIT_CODE == 0
185197 run : |
0 commit comments