Skip to content

Commit d80e8b3

Browse files
committed
chore: use sed and grep instead
1 parent 4ce2b4f commit d80e8b3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ jobs:
114114
tags_array="["
115115
first=true
116116
117-
# For each version in the matrix config
118-
for row in $(echo '${{ needs.prepare.outputs.matrix_config }}' | jq -cr '.include[]'); do
119-
version=$(echo $row | jq -r '.version')
120-
117+
# Extract versions directly from matrix config using grep/sed
118+
matrix_json='${{ needs.prepare.outputs.matrix_config }}'
119+
versions=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/"version":"\(.*\)"/\1/')
120+
121+
# For each version
122+
while read -r version; do
121123
if [ "$first" = true ]; then
122124
first=false
123125
else
@@ -135,7 +137,7 @@ jobs:
135137
136138
versions_array+="\"${version}\""
137139
tags_array+="\"supabase/postgres:${PG_VERSION}\""
138-
done
140+
done <<< "$versions"
139141
140142
versions_array+="]"
141143
tags_array+="]"

0 commit comments

Comments
 (0)