From d07361d2a18410fd6291813f09b9d02ce4cd05d0 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:04:49 -0400 Subject: [PATCH 1/7] Upgrade GitHub Actions to version 4 --- .github/workflows/031-build-deploy-webapp-to-azure.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index 0d08a17..938f6b0 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -38,7 +38,7 @@ jobs: working-directory: 03-app-dotnet steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up .NET Core uses: actions/setup-dotnet@v2 @@ -46,7 +46,7 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Set up dependency caching for faster builds - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} @@ -60,7 +60,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Upload artifact for deployment job - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: .net-app path: ${{env.DOTNET_ROOT}}/myapp @@ -74,7 +74,7 @@ jobs: steps: - name: Download artifact from build job - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: .net-app From cbaf98af8e263733cf6728b88dac4b6049683532 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:09:07 -0400 Subject: [PATCH 2/7] Upgrade Azure Web Apps deploy action to v3 --- .github/workflows/031-build-deploy-webapp-to-azure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index 938f6b0..3d01c5c 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -80,7 +80,7 @@ jobs: - name: Deploy to Azure Web App id: deploy-to-webapp - uses: azure/webapps-deploy@v2 + uses: azure/webapps-deploy@v3 with: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} From 1188d8986c28ce21cb877144b509985853e32c26 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:10:44 -0400 Subject: [PATCH 3/7] Upgrade setup-dotnet action to version 3 --- .github/workflows/031-build-deploy-webapp-to-azure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index 3d01c5c..66867f7 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up .NET Core - uses: actions/setup-dotnet@v2 + uses:actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_VERSION }} From 1db12c24303ec20ab117312a20fdf4237bcd0516 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:21:03 -0400 Subject: [PATCH 4/7] Add Dependabot configuration for GitHub Actions --- dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 dependabot.yml diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 0000000..c226102 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,7 @@ +# .github/dependabot.yml +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From e19ab7b84cb739a84629a521c54abfe3f70d7cef Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:22:22 -0400 Subject: [PATCH 5/7] Fix formatting for setup-dotnet action --- .github/workflows/031-build-deploy-webapp-to-azure.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index 66867f7..e8b7639 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -41,8 +41,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up .NET Core - uses:actions/setup-dotnet@v3 - with: + uses: actions/setup-dotnet@v3 dotnet-version: ${{ env.DOTNET_VERSION }} - name: Set up dependency caching for faster builds From b66a12fc8331f3474c63f49d1564e9e88aef967c Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:23:43 -0400 Subject: [PATCH 6/7] Fix Azure Web App deployment workflow Updated Azure deployment workflow to fix branch specification and improve artifact handling. --- .../031-build-deploy-webapp-to-azure.yml | 45 ++++++------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index e8b7639..7a849d3 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -1,38 +1,19 @@ -# This workflow will build and push a .NET Core app to an Azure Web App when a commit is pushed to your default branch. -# -# This workflow assumes you have already created the target Azure App Service web app. -# For instructions see https://docs.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net60&pivots=development-environment-vscode -# -# To configure this workflow: -# -# 1. Download the Publish Profile for your Azure Web App. You can download this file from the Overview page of your Web App in the Azure Portal. -# For more information: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#generate-deployment-credentials -# -# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret. -# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret -# -# 3. Change the value for the AZURE_WEBAPP_NAME. Optionally, change the AZURE_WEBAPP_PACKAGE_PATH and DOTNET_VERSION environment variables below. -# -# For more information on GitHub Actions for Azure: https://github.com/Azure/Actions -# For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples - name: 031-build-deploy-webapp-to-azure env: - AZURE_WEBAPP_NAME: appservice-enis # set this to the name of your Azure Web App - DOTNET_VERSION: '6.0.x' # set this to the .NET Core version to use + AZURE_WEBAPP_NAME: appservice-enis + DOTNET_VERSION: '6.0.x' on: push: - branches: none - # - main + branches: + - main # fixed (was invalid: branches: none) workflow_dispatch: jobs: build: runs-on: ubuntu-latest - + defaults: run: working-directory: 03-app-dotnet @@ -41,9 +22,10 @@ jobs: - uses: actions/checkout@v4 - name: Set up .NET Core - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v3 + with: # ✅ FIX: missing "with" dotnet-version: ${{ env.DOTNET_VERSION }} - + - name: Set up dependency caching for faster builds uses: actions/cache@v4 with: @@ -56,26 +38,27 @@ jobs: run: dotnet build --configuration Release - name: dotnet publish - run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp + run: dotnet publish -c Release -o ./publish # ✅ safer path - name: Upload artifact for deployment job uses: actions/upload-artifact@v4 with: - name: .net-app - path: ${{env.DOTNET_ROOT}}/myapp + name: dotnet-app # ✅ avoid dot in name + path: ./publish deploy: runs-on: ubuntu-latest needs: build + environment: - name: 'Development' + name: Development url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} steps: - name: Download artifact from build job uses: actions/download-artifact@v4 with: - name: .net-app + name: dotnet-app - name: Deploy to Azure Web App id: deploy-to-webapp From de78ca344039a634d9d92d5f828cdef6d75d1da5 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Thu, 26 Mar 2026 21:29:05 -0400 Subject: [PATCH 7/7] Fix Azure deployment workflow and artifact handling Updated deployment workflow for Azure Web App to fix missing 'with' for .NET setup, specify download path for artifacts, and point package to the downloaded artifact. --- .../031-build-deploy-webapp-to-azure.yml | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/031-build-deploy-webapp-to-azure.yml b/.github/workflows/031-build-deploy-webapp-to-azure.yml index 7a849d3..21b91d3 100644 --- a/.github/workflows/031-build-deploy-webapp-to-azure.yml +++ b/.github/workflows/031-build-deploy-webapp-to-azure.yml @@ -23,7 +23,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v3 - with: # ✅ FIX: missing "with" + with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Set up dependency caching for faster builds @@ -46,24 +46,28 @@ jobs: name: dotnet-app # ✅ avoid dot in name path: ./publish - deploy: - runs-on: ubuntu-latest - needs: build +deploy: + runs-on: ubuntu-latest + needs: build - environment: - name: Development - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + environment: + name: Development + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: dotnet-app + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: dotnet-app + path: ./app # ✅ FIX: explicit download location - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v3 - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: . + - name: Verify downloaded files (debug) + run: ls -R ./app # ✅ helps confirm files exist + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ./app # ✅ FIX: point to downloaded artifact