From 82c6b8f2d2cf08d6610a7667fdf5d90d63c70d49 Mon Sep 17 00:00:00 2001 From: Hasibul Hasan <61783881+hsblhsn@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:47:15 +0200 Subject: [PATCH 1/5] feat: get arch from runner context. --- action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index dc07917..0085296 100644 --- a/action.yml +++ b/action.yml @@ -32,13 +32,16 @@ runs: esac os=${{ runner.os }} + arch=$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]') if [[ $os == "macOS" ]]; then os="Darwin" fi - + if [[ $arch == "x86" ]]; then + arch="x86_64" + fi if [[ ! -z ${tag} ]]; then echo "Installing ko @ ${tag} for ${os}" - curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin ko + curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_${arch}.tar.gz | sudo tar xzf - -C /usr/local/bin ko fi if [[ ! -z ${KO_DOCKER_REPO} ]]; then From 21db99ab8e0174e234b8b4774409f0073daac570 Mon Sep 17 00:00:00 2001 From: Hasibul Hasan <61783881+hsblhsn@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:52:45 +0200 Subject: [PATCH 2/5] chore: print arch information. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0085296..7b72669 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,7 @@ runs: arch="x86_64" fi if [[ ! -z ${tag} ]]; then - echo "Installing ko @ ${tag} for ${os}" + echo "Installing ko @ ${tag} for ${os} ${arch}" curl -fsL https://github.com/ko-build/ko/releases/download/${tag}/ko_${tag:1}_${os}_${arch}.tar.gz | sudo tar xzf - -C /usr/local/bin ko fi From 879691fd5ebbc1aedb61e656debfe4a8f8bac969 Mon Sep 17 00:00:00 2001 From: Hasibul Hasan <61783881+hsblhsn@users.noreply.github.com> Date: Tue, 20 Aug 2024 07:41:51 +0200 Subject: [PATCH 3/5] fix: x86_64 os check condition. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7b72669..0b4fb2b 100644 --- a/action.yml +++ b/action.yml @@ -36,7 +36,7 @@ runs: if [[ $os == "macOS" ]]; then os="Darwin" fi - if [[ $arch == "x86" ]]; then + if [[ $arch == "x64" ]]; then arch="x86_64" fi if [[ ! -z ${tag} ]]; then From 8f21d59a4859a0106dc2604f5ee29f148ac2364f Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 14 Jan 2025 16:57:40 -0500 Subject: [PATCH 4/5] Update ci.yaml --- .github/workflows/ci.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4fc4703..72fc3a3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,7 +5,13 @@ on: jobs: test-ko-action: - runs-on: ubuntu-latest + strategy: + matrix: + runner: + - ubuntu-latest + - macos-latest + - github-arm64-2c-8gb + runs-on: ${{matrix.runner}} steps: - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 From d632f4ff0f49b1b7cbc6d34409daa046b37997dd Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 14 Jan 2025 17:00:59 -0500 Subject: [PATCH 5/5] Update ci.yaml --- .github/workflows/ci.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 72fc3a3..4fc4703 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,13 +5,7 @@ on: jobs: test-ko-action: - strategy: - matrix: - runner: - - ubuntu-latest - - macos-latest - - github-arm64-2c-8gb - runs-on: ${{matrix.runner}} + runs-on: ubuntu-latest steps: - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0