Skip to content

GitHub Action fails with "Please enter a valid azure cli version" error message with default "azcliversion" parameter #158

Description

@fabasoad

Steps to reproduce

  1. Use these steps in your GitHub Action:
- name: Install Azure CLI
  run: |
    curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
  shell: bash
- name: Azure CLI script
  uses: Azure/cli@v2
  with:
    inlineScript: |
      az version

Expected behavior

Azure/cli@v2 should work without any errors.

Actual behavior

The following error message is shown:

Error: Please enter a valid azure cli version. 
See available versions: https://github.com/Azure/azure-cli/releases.
Error: Error: Please enter a valid azure cli version. 
See available versions: https://github.com/Azure/azure-cli/releases.

Version info

az version
{
  "azure-cli": "2.63.0",
  "azure-cli-core": "2.63.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {}
}

Additional notes

I think the problem is that 2.63.0 version is missing in the list of tags which is used to determine if version is valid or not. I've checked with azcliversion: 2.62.0 and it works as expected but the installed version of az CLI is 2.63.0 which is taken by that script.

Recommendations

Add 2.63.0 to the list of tags in https://mcr.microsoft.com/v2/azure-cli/tags/list

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1Some scenario broken but workaround exists

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions