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.
This PR will support the parameter
inputFile
in Azure PowerShell Action.Sample workflow to run inputFile using Azure PowerShell
It's similar as the example of
inlineScript
. But in this example, aninputFile
is executed instead of aninlineScript
.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