@@ -168,29 +168,38 @@ jobs:
168
168
${{ steps.get_version.outputs.pg_version }}_amd64 \
169
169
${{ steps.get_version.outputs.pg_version }}_arm64
170
170
combine_results :
171
- needs : merge_manifest
171
+ needs : [prepare, merge_manifest]
172
172
runs-on : ubuntu-latest
173
173
steps :
174
174
- uses : actions/checkout@v3
175
175
- uses : DeterminateSystems/nix-installer-action@main
176
+ - name : Get Versions from Matrix Config
177
+ id : get_versions
178
+ run : |
179
+ # Extract the versions from prepare.outputs.matrix_config
180
+ echo "Versions: ${{ fromJson(needs.prepare.outputs.matrix_config).include }}" # Print the versions for debugging
181
+ echo "versions=$(echo '${{ fromJson(needs.prepare.outputs.matrix_config).include }}' | jq -r 'map(.version) | join(\",\")')" >> $GITHUB_ENV
182
+
176
183
- name : Download Results Artifacts
177
- uses : actions/download-artifact@v3
178
- with :
179
- name : ' merge_results-*'
184
+ run : |
185
+ # Split the versions into a list and download each corresponding artifact
186
+ for version in $(echo ${{ env.versions }} | tr "," "\n"); do
187
+ artifact_name="merge_results-${version}"
188
+ echo "Downloading artifact: $artifact_name"
189
+ actions/download-artifact@v3
190
+ with:
191
+ name: $artifact_name
180
192
- name : Combine Results
181
193
id : combine
182
194
run : |
183
195
nix run nixpkgs#nushell -- -c '
184
- # Initialize an empty array to store combined results
185
196
let combined_results = []
186
197
187
- # Loop through all downloaded result files
188
198
ls **/results.txt | each { |result_file|
189
199
let results = (open $result_file | lines | where { $it != "" })
190
200
$combined_results = $combined_results + $results
191
201
}
192
202
193
- # Create the matrix format for the combined results
194
203
let matrix = ($combined_results | each { { version: $it } }) | to json
195
204
$"matrix=$matrix" | save --append $env.GITHUB_OUTPUT
196
205
'
0 commit comments