Skip to content

Commit 60dd2dd

Browse files
committed
chore: format correctly for nushell
1 parent 16cfb3f commit 60dd2dd

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,32 @@ jobs:
173173
steps:
174174
- uses: actions/checkout@v3
175175
- uses: DeterminateSystems/nix-installer-action@main
176+
176177
- name: Get Versions from Matrix Config
177178
id: get_versions
178179
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
180+
nix run nixpkgs#nushell -- -c '
181+
# Extract the versions from prepare.outputs.matrix_config
182+
let versions = ${{ fromJson(needs.prepare.outputs.matrix_config).include }} | get version
183+
echo "Versions: $versions"
184+
185+
# Set the versions to an environment variable in GitHub Actions' environment
186+
let versions_str = ($versions | join ",")
187+
$"versions=$versions_str" | save --append $env.GITHUB_ENV
188+
'
182189
183190
- name: Download Results Artifacts
184191
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
192+
nix run nixpkgs#nushell -- -c '
193+
let versions = env.versions | str split ","
194+
foreach $version in $versions {
195+
let artifact_name = "merge_results-$version"
196+
echo "Downloading artifact: $artifact_name"
197+
actions/download-artifact@v3
198+
with:
199+
name: $artifact_name
200+
}
201+
'
192202
- name: Combine Results
193203
id: combine
194204
run: |

0 commit comments

Comments
 (0)