From c9d15cd3039d73dbed587851b7aeec0e52c6ca73 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 30 Jul 2024 09:31:19 +1000 Subject: [PATCH] Using official microsoft instruction --- .../publish-azure-cc-enclave-docker.yaml | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-azure-cc-enclave-docker.yaml b/.github/workflows/publish-azure-cc-enclave-docker.yaml index f3785bec8..66ea19cc4 100644 --- a/.github/workflows/publish-azure-cc-enclave-docker.yaml +++ b/.github/workflows/publish-azure-cc-enclave-docker.yaml @@ -225,14 +225,30 @@ jobs: - name: install azure-cli 2.61.0 run: | - sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg -y - curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null - AZ_REPO=$(lsb_release -cs) - echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list - AZ_VER=2.61.0 sudo apt-get update + sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release + sudo mkdir -p /etc/apt/keyrings + curl -sLS https://packages.microsoft.com/keys/microsoft.asc | + gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null + sudo chmod go+r /etc/apt/keyrings/microsoft.gpg + AZ_DIST=$(lsb_release -cs) + echo "Types: deb + URIs: https://packages.microsoft.com/repos/azure-cli/ + Suites: ${AZ_DIST} + Components: main + Architectures: $(dpkg --print-architecture) + Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources + sudo apt-get update + sudo apt-get install azure-cli + + apt-cache policy azure-cli + # Obtain the currently installed distribution + AZ_DIST=$(lsb_release -cs) + # Store an Azure CLI version of choice + AZ_VER=2.61.0 + # Install a specific version sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST} - + - name: check azure-cli version run: | az --version