Skip to content

AzurePowerShellScript #13

AzurePowerShellScript

AzurePowerShellScript #13

Workflow file for this run

name: AzurePowerShellScript
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest #Windows has the RM modules along with Az. 'ubuntu-latest' works. But both have 2 versions older modules. 11.3 instead of 11.5.
container:
image: mcr.microsoft.com/azure-powershell:latest
steps:
- name: Check Out
uses: actions/checkout@v4
#with: #Checkout presents the repo to the Pipeline execution runtime.
# ref: main # Specify the branch or commit
# path: ./3TierApp # Specify the folder path if the script doesn't need the entire repo for execution.
#However, this is presenting the entire repo under a '3TierApp' folder. Verified using 'Get-ChildItem -Recurse'
- name: Login Azure
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true
- name: Run Azure PowerShell Script File
uses: azure/powershell@v2
with:
inlineScript: ./3TierApp/GetRG.ps1
azPSVersion: "latest"