Azure / powershell

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

Support inputFile #80

Closed YanaXu closed 1 year ago

YanaXu commented 1 year ago

This PR will support the parameter inputFile in Azure PowerShell Action.

Sample workflow to run inputFile using Azure PowerShell

on: [push]

name: AzurePowerShellSample

jobs:

  build:
    runs-on: ubuntu-latest
    steps:

    - name: 'Checking out repo code'
      uses: actions/checkout@v3

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

    - name: Run Azure PowerShell script
      uses: azure/powershell@v1
      with:
        inputFile: ./ps/run_az.ps1
        azPSVersion: "latest"

It's similar as the example of inlineScript. But in this example, an inputFile is executed instead of an inlineScript. inputFile should be a file in your repository. Thus, make sure the repository is checked out before the Azure PowerShell Action is used. In this example, ./ps/run_az.ps1 should be right under the repository root folder.

Test

github-actions[bot] commented 1 year ago

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

YanaXu commented 1 year ago

This PR is not necessary since we can run script files directly.