Skip to content

Commit

Permalink
fix(#3): Fix action with Camel K 2.x
Browse files Browse the repository at this point in the history
Use os arch when resolving CLI artifact to download
  • Loading branch information
christophd committed Aug 16, 2023
1 parent af14881 commit 6f2d479
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand Down Expand Up @@ -54,8 +55,9 @@ jobs:
- macos-latest
- windows-latest
version:
- v1.5.0
- v1.4.1
- v1.10.4
- v1.12.1
- v2.0.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down
12 changes: 10 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EOF
main() {
local version="$DEFAULT_VERSION"
local github_token=

parse_command_line "$@"

install_camel_k
Expand Down Expand Up @@ -93,7 +93,15 @@ install_camel_k() {

echo "Installing Camel K CLI version $version$info on $os..."

curl -L --silent https://github.com/apache/camel-k/releases/download/$install_version/camel-k-client-$binary_version-$os-64bit.tar.gz -o kamel.tar.gz
arch="$(uname -m)"
if [[ $binary_version == 1.* ]]
then
arch="64bit"
fi

echo "Loading camel-k/releases/download/$install_version/camel-k-client-$binary_version-$os-$arch.tar.gz"

curl -L --silent https://github.com/apache/camel-k/releases/download/$install_version/camel-k-client-$binary_version-$os-$arch.tar.gz -o kamel.tar.gz
mkdir -p _kamel
tar -zxf kamel.tar.gz --directory ./_kamel

Expand Down

0 comments on commit 6f2d479

Please # to comment.