Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what are the benefits on using azure/CLI action over standard run command #115

Closed
xiang-zhu-pr opened this issue Sep 7, 2023 · 2 comments
Assignees
Labels
need-to-triage Requires investigation

Comments

@xiang-zhu-pr
Copy link

xiang-zhu-pr commented Sep 7, 2023

Hello,

Except for azcliversion in azure/CLI that I can specify the version to use, what are the other benefits of cli over - run: step, as I find that I can also run az command inside - run: step, and I write less code than azure/cli action.

@xiang-zhu-pr xiang-zhu-pr added the need-to-triage Requires investigation label Sep 7, 2023
@xiang-zhu-pr xiang-zhu-pr changed the title what are the benifits on using azure/CLI action over standard run command what are the benefits on using azure/CLI action over standard run command Sep 7, 2023
@MoChilia
Copy link
Member

MoChilia commented Sep 8, 2023

Hi @xiang-zhu-pr,

The primary benefit of using the Azure/CLI action over the standard '- run' step with 'az' commands lies in its containerized environment. When you use the Azure/CLI action, it runs 'az' commands within a Docker container. This provides several advantages:

  • It offers a separated operating environment, ensuring that your workflow runs consistently and independently of the runner's configuration. This isolation minimizes the risk of conflicts with different versions of 'az cli' that you may need to use within the same runner, as well as potential clashes with installed tools and dependencies.
  • As you mentioned, it allows you to easily manage and switch between different versions of 'az cli.' This flexibility ensures that your scripts remain compatible with your desired 'az cli' version, providing adaptability to changing project requirements.
  • Besides, some self-hosted runners may not have 'az cli' pre-installed, the Azure/CLI action eliminates the need for complex installation steps. You can conveniently execute 'az' commands within the Azure/CLI action without the hassle of manual setup.

@xiang-zhu-pr
Copy link
Author

thx a lot

KronosTheLate added a commit to KronosTheLate/github-azure-oidc that referenced this issue Sep 12, 2024
Benefit described [here](Azure/cli#115)
jongio pushed a commit to jongio/github-azure-oidc that referenced this issue Sep 13, 2024
Benefit described [here](Azure/cli#115)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-to-triage Requires investigation
Projects
None yet
Development

No branches or pull requests

2 participants