Skip to content

Commit

Permalink
fix: get latest kbc version
Browse files Browse the repository at this point in the history
  • Loading branch information
hosekpeter committed Jan 9, 2025
1 parent 94d195c commit cc0e019
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/local-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,32 @@ jobs:
uses: actions/checkout@v4

- name: Download keboola CLI
run: |
sudo wget -P /etc/apt/trusted.gpg.d https://cli-dist.keboola.com/deb/keboola.gpg
echo "deb https://cli-dist.keboola.com/deb /" | sudo tee /etc/apt/sources.list.d/keboola.list
id: kbc_download_latest_release
uses: robinraju/release-downloader@v1.11
with:
repository: 'keboola/keboola-as-code'
latest: true
fileName: '*_linux_amd64.zip'

- name: Install keboola CLI
run: |
sudo apt-get update
sudo apt-get install keboola-cli
mkdir "${{ runner.temp }}/kbc"
latest_tag=${{steps.kbc_download_latest_release.outputs.tag_name}}
latest_version=${latest_tag:1}
release_zip="keboola-cli_${latest_version}_linux_amd64.zip"
if [ ! -f "$release_zip" ]; then
echo "Could not download keboola-cli_${latest_version}_linux_amd64.zip from the latest release."
exit 1
fi
# Unzip the CLI binary
release_bin="/usr/local/bin/kbc"
unzip "$release_zip" -d /usr/local/bin
chmod +x "$release_bin"
echo "Keboola as Code CLI installed: $release_bin"
kbc --version
shell: bash

- name: Set TEST_KBC_PROJECTS_FILE entries
uses: ./.github/actions/export-kbc-projects
Expand Down

0 comments on commit cc0e019

Please sign in to comment.