Skip to content

Commit

Permalink
checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarjun Sanji committed Jul 2, 2024
1 parent 3b1ce98 commit 3e07228
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/debricked-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 3e07228

Please sign in to comment.