From 3e0722860df65d32e5c5ee788a9e159addc54b70 Mon Sep 17 00:00:00 2001 From: Nagarjun Sanji Date: Tue, 2 Jul 2024 12:28:04 +0530 Subject: [PATCH] checking --- .github/workflows/debricked-cli.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/debricked-cli.yml b/.github/workflows/debricked-cli.yml index c99960f..8fc2a43 100644 --- a/.github/workflows/debricked-cli.yml +++ b/.github/workflows/debricked-cli.yml @@ -18,24 +18,20 @@ jobs: id: get_latest_release run: | latest_release=$(curl -s https://api.github.com/repos/debricked/cli/releases/tags/v2.0.3) - download_urls=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith("cli_linux_arm64.tar.gz") or endswith("cli_windows_x86_64.tar.gz") or endswith("cli_linux_i386.tar.gz")).browser_download_url') - echo "download_urls=$download_urls" >> $GITHUB_OUTPUT + download_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith("cli_windows_x86_64.tar.gz")).browser_download_url') + echo "Download URL: $download_url" + echo "download_url=$download_url" >> $GITHUB_OUTPUT - - name: Download latest releases + - name: Download latest release run: | mkdir -p resources/debricked-cli - for url in ${{ steps.get_latest_release.outputs.download_urls }}; do - filename=$(basename "$url") - echo "Downloading $filename from $url" - curl -L "$url" -o "resources/debricked-cli/$filename" - done + echo "Download URL: ${{ steps.get_latest_release.outputs.download_url }}" + curl -L ${{ steps.get_latest_release.outputs.download_url }} -o resources/debricked-cli/debricked-cli.tar.gz - name: Extract Debricked CLI run: | - for file in resources/debricked-cli/*.tar.gz; do - tar -xzf "$file" -C resources/debricked-cli - rm "$file" - done + tar -xzf resources/debricked-cli/debricked-cli.tar.gz -C resources/debricked-cli + rm resources/debricked-cli/debricked-cli.tar.gz - name: Commit changes run: |