Skip to content

Which docker image can I use to run the github action #104

@wenwenchenbosch

Description

@wenwenchenbosch

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. 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?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions