Azure / powershell

GH Action to run Az PowerShell scripts for developers and administrators to develop, deploy, and manage Microsoft Azure applications.
MIT License
60 stars 40 forks source link

Add support for action input fromFile: #49

Closed Pwd9000-ML closed 1 year ago

Pwd9000-ML commented 2 years ago

Is it possible to add support for running a script from a file location inside of the repo, rather than embedding the script "inline"?

Example:

inputs:
  inlineScript:
    description: 'Specify the Az PowerShell script here.'
    required: false

  fromFile:
    description: 'Path to script file relevant to repo root, default "." '
    required: false
    default: .
github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

BALAGA-GAYATRI commented 2 years ago

We marked this as an enhancement request and will be discussed. We shall keep you updated if it is decided to implement. Thanks!

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

bogdan-grozoiu commented 1 year ago

Hi, any traction here?

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

YanaXu commented 1 year ago

Hi @bogdan-grozoiu ,

If you have an Azure PowerShell script file in your GitHub repo, have you tried to run it directly? An example like this (Assume the script file is ./scripts/test1.ps1 and it's right in the root folder of your GitHub repo.):

    - name: Check Out
      uses: actions/checkout@v3
    - name: Login Azure
      uses: azure/login@v1
      with:
        creds: ${{secrets.AZURE_CREDENTIALS}}
        enable-AzPSSession: true 
    - name: Run Azure PowerShell Script File
      uses: azure/powershell@v1
      with:
        inlineScript: ./scripts/test1.ps1
        azPSVersion: "latest"