Skip to content

Commit

Permalink
chore: use sed and grep instead
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed Dec 17, 2024
1 parent 4ce2b4f commit d80e8b3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -135,7 +137,7 @@ jobs:
versions_array+="\"${version}\""
tags_array+="\"supabase/postgres:${PG_VERSION}\""
done
done <<< "$versions"
versions_array+="]"
tags_array+="]"
Expand Down

0 comments on commit d80e8b3

Please sign in to comment.