@@ -128,8 +128,7 @@ jobs:
128
128
include : ${{ fromJson(needs.prepare.outputs.matrix_config).include }}
129
129
runs-on : ubuntu-latest
130
130
outputs :
131
- tags : ${{ steps.combine_tags.outputs.tags }}
132
- matrix-rows : ${{ toJSON(steps.*.outputs.version) }}
131
+ matrix_results : ${{ toJSON(steps.collect_versions.outputs.results) }}
133
132
steps :
134
133
- uses : actions/checkout@v3
135
134
- uses : DeterminateSystems/nix-installer-action@main
@@ -150,32 +149,44 @@ jobs:
150
149
}
151
150
let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
152
151
153
- $"pg_version=($pg_version)" | save --append $env.GITHUB_OUTPUT
152
+ $"pg_version=supabase/postgres: ($pg_version)" | save --append $env.GITHUB_OUTPUT
154
153
'
154
+ - name : Output version
155
+ id : output_version
156
+ run : |
157
+ echo "result=${{ steps.get_version.outputs.pg_version }}" >> $GITHUB_OUTPUT
158
+ - name : Collect versions
159
+ id : collect_versions
160
+ run : |
161
+ echo "results[${{ strategy.job-index }}]=${{ steps.output_version.outputs.result }}" >> $GITHUB_OUTPUT
155
162
- name : Merge multi-arch manifests
156
163
run : |
157
164
docker buildx imagetools create -t supabase/postgres:${{ steps.get_version.outputs.pg_version }} \
158
165
supabase/postgres:${{ steps.get_version.outputs.pg_version }}_amd64 \
159
166
supabase/postgres:${{ steps.get_version.outputs.pg_version }}_arm64
160
- - name : Create step output
161
- id : step_output
162
- run : |
163
- echo "version=${{ steps.get_version.outputs.pg_version }}" >> $GITHUB_OUTPUT
164
- - name : Combine tags
165
- if : always()
166
- id : combine_tags
167
- run : |
168
- nix run nixpkgs#nushell -- -c '
169
- let versions = (${{ toJSON(steps.*.outputs.version) }})
170
- let matrix = {
171
- include: ($versions | each { |v| {version: $v} })
172
- }
173
- $"tags=($matrix | to json -r)" | save --append $env.GITHUB_OUTPUT
174
- '
175
- publish :
167
+
168
+ combine_versions :
176
169
needs : merge_manifest
170
+ runs-on : ubuntu-latest
171
+ outputs :
172
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
173
+ steps :
174
+ - uses : DeterminateSystems/nix-installer-action@main
175
+ - name : Combine versions into matrix
176
+ id : set-matrix
177
+ run : |
178
+ nix run nixpkgs#nushell -- -c '
179
+ let versions = (${{ needs.merge_manifest.outputs.matrix_results }} | from json)
180
+ let matrix = {
181
+ include: ($versions | each { |ver| { version: $ver } })
182
+ }
183
+ $"matrix=($matrix | to json -r)" | save --append $env.GITHUB_OUTPUT
184
+ '
185
+
186
+ publish :
187
+ needs : combine_versions
177
188
strategy :
178
- matrix : ${{ fromJson(needs.merge_manifest .outputs.tags ) }}
189
+ matrix : ${{ fromJson(needs.combine_versions .outputs.matrix ) }}
179
190
uses : ./.github/workflows/mirror.yml
180
191
with :
181
192
version : ${{ matrix.version }}
0 commit comments