user989988
user989988

Reputation: 3746

Build solution using GitHub action

I have an Azure Pipeline build step as follows:

- task: DotNetCoreCLI@2
      displayName: dotnet build
      inputs:
        command: build
        workingDirectory: 'Service\XYZ'
        arguments: '--configuration $(buildConfiguration)'

I converted this to a GitHub action as follows:

    - name: dotnet build
      run: dotnet build --configuration ${{ env.buildConfiguration }}

How do I specify workingDirectory in this GitHub action?

Upvotes: 0

Views: 132

Answers (1)

Itay Brenner
Itay Brenner

Reputation: 810

You can change the directory to the only you want to work in, for example like this:

 - name: dotnet build
   run: |
     cd Service\XYZ
     dotnet build --configuration ${{ env.buildConfiguration }}

Upvotes: 1

Related Questions