You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`azcliversion` – **Optional** Example: 2.0.72, Default: set to az cli version of the agent.
10
10
-`inlineScript` – **Required**
11
11
12
+
Azure CLI GitHub Action is supported for the Azure public cloud as well as Azure government clouds ('AzureUSGovernment' or 'AzureChinaCloud') and Azure Stack ('AzureStack') Hub. Before running this action, login to the respective Azure Cloud using [Azure Login](https://github.com/Azure/login) by setting appropriate value for the `environment` parameter.
13
+
12
14
The definition of this GitHub Action is in [action.yml](https://github.com/Azure/CLI/blob/master/action.yml). The action status is determined by the exit code returned by the script rather than StandardError stream.
13
15
16
+
## Note
17
+
Please note that the action executes Az CLI script in a docker container. This means that the action is subjected to potential restrictions which arise from containerized execution. For example:
18
+
1. If script sets up an environment variable, it will not take effect in host and hence subsequent actions shouldn't rely on such environment variable.
19
+
2. There is some restriction on how cross action file read/write is done. GITHUB_WORKSPACE directory in host is mapped to working directory inside container. So, if the action wants to create a file, which will be read by subsequent actions, it should do so within current working directory tree.
20
+
14
21
## Sample workflow
15
22
16
23
### Dependencies on other GitHub Actions
17
-
*[Azure Login](https://github.com/Azure/login) – **Required** Login with your Azure credentials
24
+
*[Azure Login](https://github.com/Azure/login) – **Optional**Login with your Azure credentials, required only for authentication via azure credentials. Authentication via connection strings or keys do not require this step.
18
25
*[Checkout](https://github.com/actions/checkout) – **Optional** To execute the scripts present in your repository
19
26
### Workflow to execute an AZ CLI script of a specific CLI version
20
27
```
@@ -104,12 +111,6 @@ Follow the steps to configure the secret:
104
111
```
105
112
* Now in the workflow file in your branch: `.github/workflows/workflow.yml` replace the secret in Azure login action with your secret (Refer to the example above)
106
113
107
-
108
-
## Note
109
-
Please note that the action executes Az CLI script in a docker container. This means that the action is subjected to potential restrictions which arise from containerized execution. For example:
110
-
1. If script sets up an environment variable, it will not take effect in host and hence subsequent actions shouldn't rely on such environment variable.
111
-
2. There is some restriction on how cross action file read/write is done. GITHUB_WORKSPACE directory in host is mapped to working directory inside container. So, if the action wants to create a file, which will be read by subsequent actions, it should do so within current working directory tree.
112
-
113
114
## Azure CLI Action metadata file
114
115
115
116
```
@@ -131,6 +132,10 @@ runs:
131
132
main: 'lib/main.js'
132
133
```
133
134
135
+
# Getting Help for Azure CLI Issues
136
+
137
+
If you encounter an issue related to the Azure CLI commands executed in your script, you can file an issue directly on the [Azure CLI repository](https://github.com/Azure/azure-cli/issues/new/choose).
138
+
134
139
# Contributing
135
140
136
141
This project welcomes contributions and suggestions. Most contributions require you to agree to a
0 commit comments