@@ -11,31 +11,35 @@ inputs:
11
11
description : ' Azure CLI Version to install'
12
12
required : false
13
13
default : " latest"
14
+ bicep_version :
15
+ description : ' Bicep Version to install'
16
+ required : false
17
+ default : " 0.33.93"
14
18
runs :
15
19
using : " composite"
16
20
steps :
17
21
- name : ' install azure-cli'
18
22
shell : bash
19
23
env :
20
24
AZ_VER : ${{ inputs.version }}
25
+ BICEP_VER : ${{ inputs.bicep_version }}
21
26
run : |
22
- if [[ "${AZ_VER}" == "latest" ]]; then
23
- # If AZ_VER == latest, then don't bother installing a specific version of az
24
- exit 0
27
+ if [[ "${AZ_VER}" != "latest" ]]; then
28
+ sudo mkdir -p /etc/apt/keyrings
29
+ curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
30
+ gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
31
+ sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
32
+ AZ_DIST=$(lsb_release -cs)
33
+ echo "Types: deb
34
+ URIs: https://packages.microsoft.com/repos/azure-cli/
35
+ Suites: ${AZ_DIST}
36
+ Components: main
37
+ Architectures: $(dpkg --print-architecture)
38
+ Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
39
+ sudo apt-get update
40
+ # Obtain the currently installed distribution
41
+ AZ_DIST=$(lsb_release -cs)
42
+ # Install a specific version
43
+ sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST} --allow-downgrades
25
44
fi
26
- sudo mkdir -p /etc/apt/keyrings
27
- curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
28
- gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
29
- sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
30
- AZ_DIST=$(lsb_release -cs)
31
- echo "Types: deb
32
- URIs: https://packages.microsoft.com/repos/azure-cli/
33
- Suites: ${AZ_DIST}
34
- Components: main
35
- Architectures: $(dpkg --print-architecture)
36
- Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
37
- sudo apt-get update
38
- # Obtain the currently installed distribution
39
- AZ_DIST=$(lsb_release -cs)
40
- # Install a specific version
41
- sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST} --allow-downgrades
45
+ az bicep install --version ${BICEP_VER}
0 commit comments