From d80e8b3982723b8b220483722e8615665e79c96b Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 17 Dec 2024 15:26:58 -0500 Subject: [PATCH] chore: use sed and grep instead --- .github/workflows/dockerhub-release-matrix.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dockerhub-release-matrix.yml b/.github/workflows/dockerhub-release-matrix.yml index 1c48e56e1..c0430aed9 100644 --- a/.github/workflows/dockerhub-release-matrix.yml +++ b/.github/workflows/dockerhub-release-matrix.yml @@ -114,10 +114,12 @@ jobs: tags_array="[" first=true - # For each version in the matrix config - for row in $(echo '${{ needs.prepare.outputs.matrix_config }}' | jq -cr '.include[]'); do - version=$(echo $row | jq -r '.version') - + # Extract versions directly from matrix config using grep/sed + matrix_json='${{ needs.prepare.outputs.matrix_config }}' + versions=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/"version":"\(.*\)"/\1/') + + # For each version + while read -r version; do if [ "$first" = true ]; then first=false else @@ -135,7 +137,7 @@ jobs: versions_array+="\"${version}\"" tags_array+="\"supabase/postgres:${PG_VERSION}\"" - done + done <<< "$versions" versions_array+="]" tags_array+="]"