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