Skip to content

Commit c77a2c5

Browse files
authored
fix: cloudwatch metrics syntax (#157)
1 parent 024f3c4 commit c77a2c5

File tree

1 file changed

+4
-3
lines changed
  • .github/actions/artifact-size-metrics/utils/calculate-and-upload

1 file changed

+4
-3
lines changed

.github/actions/artifact-size-metrics/utils/calculate-and-upload/cloudwatch.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ uploadToCloudwatch() {
1313
artifactSize=$(echo "$artifactSize" | xargs)
1414

1515
# Build metric JSON
16-
metrics+=$(jq -n \
16+
metric_json=$(jq -n \
1717
--arg name "$GITHUB_REPOSITORY-$artifactName" \
1818
--arg value "$artifactSize" \
1919
--arg project "$GITHUB_REPOSITORY" \
@@ -25,8 +25,9 @@ uploadToCloudwatch() {
2525
Dimensions: [
2626
{ Name: "Project", Value: $project }
2727
]
28-
}'
29-
)
28+
}')
29+
30+
metrics+=("$metric_json")
3031
done < "$metrics_file"
3132

3233
namespace="Artifact Size Metrics"

0 commit comments

Comments
 (0)