@@ -128,42 +128,51 @@ jobs:
128
128
include : ${{ fromJson(needs.prepare.outputs.matrix_config).include }}
129
129
runs-on : ubuntu-latest
130
130
outputs :
131
- tags : ${{ steps.collect_tags .outputs.tags }}
131
+ tags : ${{ steps.combine_tags .outputs.tags }} # Changed to reference final combined step
132
132
steps :
133
- - uses : actions/checkout@v3
134
- - uses : DeterminateSystems/nix-installer-action@main
135
- - uses : docker/setup-buildx-action@v3
136
- - uses : docker/login-action@v2
137
- with :
138
- username : ${{ secrets.DOCKER_USERNAME }}
139
- password : ${{ secrets.DOCKER_PASSWORD }}
140
- - name : Get image tag
141
- id : get_version
142
- run : |
143
- nix run nixpkgs#nushell -- -c '
144
- let version = "${{ matrix.version }}"
145
- let release_key = if ($version | str contains "orioledb") {
146
- $"postgresorioledb-17"
147
- } else {
148
- $"postgres($version)"
149
- }
150
- let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
151
-
152
- $"pg_version=($pg_version)" | save --append $env.GITHUB_OUTPUT
153
- '
154
- - name : Merge multi-arch manifests
155
- run : |
156
- docker buildx imagetools create -t supabase/postgres:${{ steps.get_version.outputs.pg_version }} \
157
- supabase/postgres:${{ steps.get_version.outputs.pg_version }}_amd64 \
158
- supabase/postgres:${{ steps.get_version.outputs.pg_version }}_arm64
159
- - name : Collect tags
160
- id : collect_tags
161
- run : |
162
- nix run nixpkgs#nushell -- -c '
163
- let tag = "${{ steps.get_version.outputs.pg_version }}"
164
- let matrix = {include: [{version: $tag}]}
165
- $"tags=($matrix | to json -r)" | save --append $env.GITHUB_OUTPUT
166
- '
133
+ - uses : actions/checkout@v3
134
+ - uses : DeterminateSystems/nix-installer-action@main
135
+ - uses : docker/setup-buildx-action@v3
136
+ - uses : docker/login-action@v2
137
+ with :
138
+ username : ${{ secrets.DOCKER_USERNAME }}
139
+ password : ${{ secrets.DOCKER_PASSWORD }}
140
+ - name : Get image tag
141
+ id : get_version
142
+ run : |
143
+ nix run nixpkgs#nushell -- -c '
144
+ let version = "${{ matrix.version }}"
145
+ let release_key = if ($version | str contains "orioledb") {
146
+ $"postgresorioledb-17"
147
+ } else {
148
+ $"postgres($version)"
149
+ }
150
+ let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim)
151
+
152
+ $"pg_version=($pg_version)" | save --append $env.GITHUB_OUTPUT
153
+ '
154
+ - name : Merge multi-arch manifests
155
+ run : |
156
+ docker buildx imagetools create -t supabase/postgres:${{ steps.get_version.outputs.pg_version }} \
157
+ supabase/postgres:${{ steps.get_version.outputs.pg_version }}_amd64 \
158
+ supabase/postgres:${{ steps.get_version.outputs.pg_version }}_arm64
159
+ - name : Create step output
160
+ id : step_output
161
+ run : |
162
+ echo "version=${{ steps.get_version.outputs.pg_version }}" >> $GITHUB_OUTPUT
163
+ outputs :
164
+ matrix-rows : ${{ toJSON(steps.*.outputs.version) }}
165
+ - name : Combine tags
166
+ if : always()
167
+ id : combine_tags
168
+ run : |
169
+ nix run nixpkgs#nushell -- -c '
170
+ let versions = (${{ toJSON(steps.*.outputs.version) }} | from json)
171
+ let matrix = {
172
+ include: ($versions | each { |v| {version: $v} })
173
+ }
174
+ $"tags=($matrix | to json -r)" | save --append $env.GITHUB_OUTPUT
175
+ '
167
176
publish :
168
177
needs : merge_manifest
169
178
strategy :
0 commit comments