File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,19 @@ jobs:
202
202
id: combine
203
203
run: |
204
204
nix run nixpkgs#nushell -- -c '
205
- let combined_results = []
206
-
207
- ls **/results.txt | each { |result_file|
208
- let results = (open $result_file | lines | where { $it != "" })
209
- $combined_results = $combined_results + $results
210
- }
211
-
212
- let matrix = ($combined_results | each { { version : $it } }) | to json
213
- $"matrix=$matrix" | save --append $env.GITHUB_OUTPUT
205
+ # Get all results files and process them in one go
206
+ let matrix = (
207
+ ls **/results.txt
208
+ | get name # Get just the file paths
209
+ | each { |file| open $file } # Open each file
210
+ | each { |content| $content | lines } # Split into lines
211
+ | flatten # Flatten the nested lists
212
+ | where { |line| $line != "" } # Filter empty lines
213
+ | each { |line| {version : $line} } # Create objects
214
+ | to json # Convert to JSON
215
+ )
216
+
217
+ $"matrix=($matrix)" | save --append $env.GITHUB_OUTPUT
214
218
'
215
219
- name: Debug Combined Results
216
220
run: |
You can’t perform that action at this time.
0 commit comments