Skip to content

Commit

Permalink
Debug (revert later)
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed May 20, 2024
1 parent 8cb1baf commit c369312
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c369312

Please sign in to comment.