From 9c2d98ed07cde0dc7f3a69ab75072e368900dd60 Mon Sep 17 00:00:00 2001 From: "roderik.eth" Date: Thu, 18 May 2023 20:51:49 +0200 Subject: [PATCH 1/2] feat: install the right op for arm on linux --- entrypoint.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d0464ad..92dfdb8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,10 +47,19 @@ install_op_cli() { export OP_INSTALL_DIR echo "::debug::OP_INSTALL_DIR: ${OP_INSTALL_DIR}" if [[ "$OSTYPE" == "linux-gnu"* ]]; then - curl -sSfLo op.zip "https://cache.agilebits.com/dist/1P/op2/pkg/v2.10.0-beta.02/op_linux_amd64_v2.10.0-beta.02.zip" + ARCHITECTURE="" + if [[ "$(uname -m)" == "x86_64" ]]; then + ARCHITECTURE="amd64" + elif [[ "$(uname -m)" == "arm64" ]]; then + ARCHITECTURE="arm64" + else + echo "Unsupported architecture" + exit 1 + fi + curl -sSfLo op.zip "https://cache.agilebits.com/dist/1P/op2/pkg/v2.18.0/op_linux_${ARCHITECTURE}_v2.18.0.zip" unzip -od "$OP_INSTALL_DIR" op.zip && rm op.zip elif [[ "$OSTYPE" == "darwin"* ]]; then - curl -sSfLo op.pkg "https://cache.agilebits.com/dist/1P/op2/pkg/v2.10.0-beta.02/op_apple_universal_v2.10.0-beta.02.pkg" + curl -sSfLo op.pkg "https://cache.agilebits.com/dist/1P/op2/pkg/v2.18.0/op_apple_universal_v2.18.0.pkg" pkgutil --expand op.pkg temp-pkg tar -xvf temp-pkg/op.pkg/Payload -C "$OP_INSTALL_DIR" rm -rf temp-pkg && rm op.pkg From 0e91b4a315e44bb5a2e399027cb61b95011eeed5 Mon Sep 17 00:00:00 2001 From: "roderik.eth" Date: Thu, 18 May 2023 21:48:54 +0200 Subject: [PATCH 2/2] fix: arm uname --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 92dfdb8..56926ed 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,7 +50,7 @@ install_op_cli() { ARCHITECTURE="" if [[ "$(uname -m)" == "x86_64" ]]; then ARCHITECTURE="amd64" - elif [[ "$(uname -m)" == "arm64" ]]; then + elif [[ "$(uname -m)" == "aarch64" ]]; then ARCHITECTURE="arm64" else echo "Unsupported architecture"