From c369312610a221b5627938963e57d5cd1e0c5901 Mon Sep 17 00:00:00 2001 From: Vignesh Rao Date: Mon, 20 May 2024 18:24:27 -0500 Subject: [PATCH] Debug (revert later) --- action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index be8ca34..8f4d84b 100644 --- a/action.yml +++ b/action.yml @@ -97,7 +97,10 @@ runs: - name: Install Requirements if: env.os_name == 'windows' - run: winget install jqlang.jq + run: | + if [[ ! $(command -v jq) ]]; then + winget install jqlang.jq + fi shell: bash - name: Download Asset @@ -116,13 +119,12 @@ runs: echo "'none-shall-pass-rustic' $tag_name published at $published_at" asset_id=$(echo "$response" | jq -r --arg nsp_file "$nsp_file" '.assets[] | select(.name == $nsp_file) | .id') if [ -z "$asset_id" ]; then - echo "::error title=Asset ID::Failed to get the asset id for '$nsp_file'" + echo "::error title=Artifact ID::Failed to get the artifact id for '$nsp_file'" exit 1 fi asset_name=$(echo "$response" | jq -r --arg nsp_file "$nsp_file" '.assets[] | select(.name == $nsp_file) | .name') download_url=$(echo "$response" | jq -r --arg nsp_file "$nsp_file" '.assets[] | select(.name == $nsp_file) | .browser_download_url') - echo "::notice title=Asset ID::$asset_id" - echo "::notice title=Asset Name::$asset_name" + echo "::notice title=Artifact Name::$asset_name [$asset_id]" echo "::notice title=Download URL::$download_url" ${{ env.net_getter }} -H "Accept: application/octet-stream" "$download_url" > $nsp_file case "$nsp_file" in