Skip to content

Commit e691fe6

Browse files
committed
update metric publishing
1 parent 5c3fe62 commit e691fe6

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/daily-scan.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,20 @@ jobs:
123123
- name: Publish high scan status
124124
if: always()
125125
run: |
126-
value="${{ steps.high_scan_latest.outcome == 'success' && '0' || '1' }}"
127-
aws cloudwatch put-metric-data --metric-name XRayPythonSDKSecurityScanHighSeverityFailures --dimensions failure=rate --namespace MonitorSDK --value $value --timestamp $(date +%s)
126+
value="${{ steps.high_scan_latest.outcome == 'success' && '1.0' || '0.0' }}"
127+
aws cloudwatch put-metric-data --namespace 'MonitorSDK' \
128+
--metric-name Success \
129+
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_high \
130+
--value $value
128131
129132
- name: Publish low scan status
130133
if: always()
131134
run: |
132-
value="${{ steps.low_scan_latest.outcome == 'success' && steps.dep_scan.outcome == 'success' && '0' || '1' }}"
133-
aws cloudwatch put-metric-data --metric-name XRayPythonSDKSecurityScanLowSeverityFailures --dimensions failure=rate --namespace MonitorSDK --value $value --timestamp $(date +%s)
135+
value="${{ steps.low_scan_latest.outcome == 'success' && steps.dep_scan.outcome == 'success' && '1.0' || '0.0' }}"
136+
aws cloudwatch put-metric-data --namespace 'MonitorSDK' \
137+
--metric-name Success \
138+
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_low \
139+
--value $value
134140
135141
- name: Cleanup
136142
if: always()

0 commit comments

Comments
 (0)