Azure / Azure/powershell

Which docker image can I use to run the github action

Aperta
#104 2 commenti 0 reazioni 1 assegnatario Rivendicata da @YanaXu Vedi su GitHub
question
Lingua principale
TypeScript
Stelle
77
Fork
56
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I want to use this github action to run inlineScript. The github should be running in a docker container, but I can not find any official image for this purpose.

My workflow file looks similar to the one in [README](https://github.com/Azure/powershell/blob/master/README.md#sample-workflow). I only added `container`:
```
on: [push]

name: AzurePowerShellSample

jobs:

build:
runs-on: ubuntu-latest
container:
image: ???
steps:

- name: Login via Az module
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true

- name: Run Azure PowerShell inline script
uses: azure/powershell@v2
with:
inlineScript: |
Get-AzVM -ResourceGroupName "ResourceGroup11"
azPSVersion: "latest"
```

With `image: mcr.microsoft.com/azure-powershell:latest` I get error `Error: Login failed with Error: Unable to locate executable file: az. ` in the login step.
With `image:mcr.microsoft.com/azure-cli:latest` I get error `Error: Unable to locate executable file: pwsh.` in the running script step.

Can someone help me? Or I need a customer docker image for running this simple workflow?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.