Skip to content

Commit

Permalink
Using official microsoft instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Jul 29, 2024
1 parent 61d3c36 commit c9d15cd
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/publish-azure-cc-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9d15cd

Please sign in to comment.