Coder Social home page Coder Social logo

Comments (4)

YanaXu avatar YanaXu commented on September 28, 2024

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?

from powershell.

NickSt avatar NickSt commented on September 28, 2024

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.

from powershell.

YanaXu avatar YanaXu commented on September 28, 2024

@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?

from powershell.

YanaXu avatar YanaXu commented on September 28, 2024

@NickSt , I'll close this issue now. Please feel free to reopen it if you still have questions on this.

from powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.