constellation/.github/actions/azure_login/action.yml

30 lines
1011 B
YAML
Raw Normal View History

2022-05-04 07:52:27 -04:00
name: azure_login
description: "Login to Azure & configure az CLI."
inputs:
azure_credentials:
description: 'Credentials authorized to create Constellation on Azure.'
required: true
runs:
using: 'composite'
steps:
- name: Install az CLI
run: |
sudo apt-get update
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
sudo apt-get update
sudo apt-get install azure-cli -y
az help
shell: bash
# As described at:
# https://github.com/Azure/login#configure-deployment-credentials
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ inputs.azure_credentials }}