Skip to content

Commit

Permalink
chore: include and debug
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed Dec 21, 2024
1 parent 825dd85 commit c619fb8
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,24 @@ jobs:
run: |
nix run nixpkgs#nushell -- -c '
# Get all results files and process them in one go
let matrix = (
ls **/results.txt
| get name # Get just the file paths
| each { |file| open $file } # Open each file
| each { |content| $content | lines } # Split into lines
| flatten # Flatten the nested lists
| where { |line| $line != "" } # Filter empty lines
| each { |line| {version: $line} } # Create objects
| to json # Convert to JSON
)
let files = (ls **/results.txt | get name)
echo $"Found files: ($files)"

$"matrix=($matrix)" | save --append $env.GITHUB_OUTPUT
let matrix = {
include: (
$files
| each { |file| open $file } # Open each file
| each { |content| $content | lines } # Split into lines
| flatten # Flatten the nested lists
| where { |line| $line != "" } # Filter empty lines
| each { |line| {version: $line} } # Create objects
)
}

let json_output = ($matrix | to json -r) # -r for raw output
echo $"Debug output: ($json_output)"

$"matrix=($json_output)" | save --append $env.GITHUB_OUTPUT
'
- name: Debug Combined Results
run: |
Expand Down

0 comments on commit c619fb8

Please sign in to comment.