From 9f0aad803485d2bb4be2e42933f48df91329027d Mon Sep 17 00:00:00 2001 From: Ravinder Date: Sat, 18 Oct 2025 23:00:55 +0100 Subject: [PATCH] fix: added missing solution path name and added CI on pull request also --- .github/workflows/ci-cd.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0380971..2782b0a 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -2,10 +2,14 @@ name: ASP.NET Core 8 API CI/CD on: push: branches: [main] + pull_request: + branches: [main] jobs: build: # Fisrt we we will setup only build job runs-on: ubuntu-latest # <-- OS to run the job + env: # Environment variables + SOLUTION_PATH: SimpleApi-CICD/SimpleAPI/SimpleAPI.sln #// Path to the solution file steps: - name: Checkout-code # Step 1: Checkout the code from repository @@ -17,9 +21,9 @@ jobs: dotnet-version: '8.0.x' # Specify the .NET version to install - name: Restore dependencies # Step 3: Restore the dependencies - run: dotnet restore + run: dotnet restore $SOLUTION_PATH - name: Build solution # Step 4: Build the solution - run: dotnet build --no-restore --configuration Release + run: dotnet build $SOLUTION_PATH --no-restore --configuration Release