Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarjun Sanji committed Jul 2, 2024
1 parent 88e7ace commit 06900f1
Showing 1 changed file with 40 additions and 11 deletions.
51 changes: 40 additions & 11 deletions .github/workflows/debricked-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,59 @@ jobs:
with:
ref: '6-integrate-debricked-cli-with-vs-code-extension-2'

- name: Get latest release info
id: get_latest_release
- name: Get latest release info - cli_windows_x86_64
id: cli_windows_x86_64
run: |
latest_release=$(curl -s https://api.github.com/repos/debricked/cli/releases/tags/v2.0.3)
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 release
- name: Download latest release - cli_windows_x86_64
run: |
mkdir -p resources/debricked-cli
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
mkdir -p resources/debricked-cli/cli_windows_x86_64
echo "Download URL: ${{ steps.cli_windows_x86_64.outputs.download_url }}"
curl -L ${{ steps.cli_windows_x86_64.outputs.download_url }} -o resources/debricked-cli/cli_windows_x86_64/debricked-cli.tar.gz
- name: Extract Debricked CLI
- name: Extract Debricked CLI - cli_windows_x86_64
run: |
tar -xzf resources/debricked-cli/debricked-cli.tar.gz -C resources/debricked-cli
rm resources/debricked-cli/debricked-cli.tar.gz
tar -xzf resources/debricked-cli/cli_windows_x86_64/debricked-cli.tar.gz -C resources/debricked-cli/cli_windows_x86_64
rm resources/debricked-cli/cli_windows_x86_64/debricked-cli.tar.gz
- name: Commit changes
- name: Commit changes - cli_windows_x86_64
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add resources/debricked-cli
git add resources/debricked-cli/cli_windows_x86_64
git commit -m "Update Debricked CLI to latest release"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get latest release info - cli_windows_i386
id: cli_windows_i386
run: |
latest_release=$(curl -s https://api.github.com/repos/debricked/cli/releases/tags/v2.0.3)
download_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith("cli_windows_i386.tar.gz")).browser_download_url')
echo "Download URL: $download_url"
echo "download_url=$download_url" >> $GITHUB_OUTPUT
- name: Download latest release - cli_windows_i386
run: |
mkdir -p resources/debricked-cli/cli_windows_i386
echo "Download URL: ${{ steps.cli_windows_i386.outputs.download_url }}"
curl -L ${{ steps.cli_windows_i386.outputs.download_url }} -o resources/debricked-cli/cli_windows_i386/debricked-cli.tar.gz
- name: Extract Debricked CLI - cli_windows_i386
run: |
tar -xzf resources/debricked-cli/cli_windows_i386/debricked-cli.tar.gz -C resources/debricked-cli/cli_windows_i386
rm resources/debricked-cli/cli_windows_i386/debricked-cli.tar.gz
- name: Commit changes - cli_windows_i386
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add resources/debricked-cli/cli_windows_i386
git commit -m "Update Debricked CLI to latest release"
git push
env:
Expand Down

0 comments on commit 06900f1

Please sign in to comment.