Skip to content

Commit abb76c3

Browse files
committed
fix metric data
1 parent 2f98266 commit abb76c3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/actions/workflow-metrics/action.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,18 @@ runs:
2323
duration=$(($(date +%s) - $WORKFLOW_START_TIME))
2424
aws cloudwatch put-metric-data \
2525
--namespace "GitHub/Workflows" \
26-
--metric-data MetricName=Duration,Value=$duration,Unit=Seconds,Dimensions=WorkflowName=${{ inputs.workflow-name }},Repository=${{ github.repository }}
26+
--metric-data '[{
27+
"MetricName": "Duration",
28+
"Value": '$duration',
29+
"Unit": "Seconds",
30+
"Dimensions": [
31+
{
32+
"Name": "WorkflowName",
33+
"Value": "${{ inputs.workflow-name }}"
34+
},
35+
{
36+
"Name": "Repository",
37+
"Value": "${{ github.repository }}"
38+
}
39+
]
40+
}]'

0 commit comments

Comments
 (0)