Skip to content

Commit

Permalink
chore: parse matrix config directly
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed Dec 20, 2024
1 parent 60dd2dd commit 6f7ce25
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ jobs:
id: get_versions
run: |
nix run nixpkgs#nushell -- -c '
# Extract the versions from prepare.outputs.matrix_config
let versions = ${{ fromJson(needs.prepare.outputs.matrix_config).include }} | get version
echo "Versions: $versions"
# Parse the matrix configuration directly
let matrix_config = ${{ fromJson(needs.prepare.outputs.matrix_config) }}
# Extract the versions as a list
let versions = $matrix_config.include | get version
# Set the versions to an environment variable in GitHub Actions' environment
echo "Versions: $versions"
let versions_str = ($versions | join ",")
$"versions=$versions_str" | save --append $env.GITHUB_ENV
'
Expand All @@ -199,6 +201,7 @@ jobs:
name: $artifact_name
}
'
- name: Combine Results
id: combine
run: |
Expand Down

0 comments on commit 6f7ce25

Please sign in to comment.