File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change 61
61
matrix : ${{ fromJson(needs.prepare.outputs.matrix_config) }}
62
62
runs-on : ubuntu-latest
63
63
outputs :
64
- versions : ${{ steps.versions.outputs.list }}
65
- image_tags : ${{ steps.versions.outputs.image_tags }}
64
+ versions : ${{ steps.collect- versions.outputs.versions }}
65
+ image_tags : ${{ steps.collect- versions.outputs.image_tags }}
66
66
steps :
67
67
- uses : actions/checkout@v3
68
68
@@ -86,10 +86,25 @@ jobs:
86
86
with :
87
87
cmd : yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml'
88
88
89
- - id : versions
89
+ # First collect all versions into a file
90
+ - name : Save version info
90
91
run : |
91
- echo "list=[\"${{ matrix.version }}\"]" >> $GITHUB_OUTPUT
92
- echo "image_tags=[\"supabase/postgres:${{ steps.settings.outputs.postgres-version }}\"]" >> $GITHUB_OUTPUT
92
+ mkdir -p /tmp/versions
93
+ echo "${{ matrix.version }}" >> /tmp/versions/versions.txt
94
+ echo "supabase/postgres:${{ steps.settings.outputs.postgres-version }}" >> /tmp/versions/image_tags.txt
95
+
96
+ # Then at the end of the matrix, collect all versions into arrays
97
+ - name : Collect all versions
98
+ id : collect-versions
99
+ if : ${{ always() }}
100
+ run : |
101
+ # Combine all versions into arrays
102
+ VERSIONS=$(cat /tmp/versions/versions.txt | sort -u | jq -R . | jq -s .)
103
+ IMAGE_TAGS=$(cat /tmp/versions/image_tags.txt | sort -u | jq -R . | jq -s .)
104
+
105
+ # Output as JSON arrays
106
+ echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
107
+ echo "image_tags=$IMAGE_TAGS" >> $GITHUB_OUTPUT
93
108
94
109
build_release_image :
95
110
needs : build
You can’t perform that action at this time.
0 commit comments