azure/login@v1 and azure/CLI@v1 should be consistent
See original GitHub issuePlease align azure/login@v1
and azure/CLI@v1
. It’s really strange and not user friendly.
Given workflow where I first use azure/CLI@v1
to show current az version and then use azure/login@v1
it behaves quite weird.
az version
actually shows latest version because this action actually pulls and runs microsoft docker image with azure cli,
but then the azure/login@v1
action fails because this one relies on az
command being installed on self-hosted github runner.
- name: show az version
uses: azure/CLI@v1
with:
inlineScript: |
az version
- uses: azure/login@v1
with:
creds: ${{ secrets.SECRET }}
In my case the azure/login@v1
will fail on az
command not being available because my runners are quite clean and az
is not installed.
What is the reason to forcing users to both manage az
on the hosts and also require having docker installed and pull docker images for actually performing any az actions?
I believe azure/login
and azure/cli
should use consistent approach in this case.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:10
Top GitHub Comments
Example of az login failure when
az
is not installed on linux github self-hosted runner.I just lost an hour because of the
Please check the credentials.
message, when in reality it was just that theact
runner I was using didn’t haveaz
installed 😞Even if we can’t get self installing, can we at least check for
az
and abort with a clearer error message? I think it’s as simple as checking catching here: https://github.com/Azure/login/blob/db989b30605ff229e9f1de292a8f0aa043ee48b1/src/main.ts#L44Because
which
says:Which currently gets caught by this catch all whose error message doesn’t actually check the
error
🤢 : https://github.com/Azure/login/blob/db989b30605ff229e9f1de292a8f0aa043ee48b1/src/main.ts#L209-L211