Closed NickSt closed 1 year ago
Hi @NickSt , could you provide the sample workflow file, debug log and details about your runners? Do you use a self-hosted runner or a GitHub-hosted runner?
Hi YanaXu
Using github-hosted runners
The job looks like this:
jobs:
build:
name: Build
runs-on: windows-latest
environment: <customID>
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS_PRIMARY }}
enable-AzPSSession: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Calculate Variables
id: data
shell: pwsh
run: |
<script stuff here>
- name: Build
uses: azure/powershell@v1
with:
inlineScript: <script runs here>
azPSVersion: latest
failOnStandardError: true
Note I also get a warning about AzureRM being installed which I believe is from the Azure/Login action, but they are both required I think and most examples I've found show Azure/Login and Azure/Powershell being used together.
@NickSt , the latest
azPSVersion actually means the pre-installed Az module version on the GitHub-hosted runners, which is 9.3.0
. Before it's upgraded to the latest one on PSGallery, could you update your workflow file to use like azPSVersion: 11.0.0
?
@NickSt , I'll close this issue now. Please feel free to reopen it if you still have questions on this.
the latest flag does not seem to use the latest version of the az ps module. It produces a warning on each running stating version 9 is being ran.