From d47045247fb7aa2fa9df13ddb51f6a5be45d2eb2 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Mon, 17 Mar 2025 11:45:36 +0200 Subject: [PATCH 01/19] Add or update the Azure App Service build and deployment workflow config --- .../starter-no-infra_cloud-apps01.yml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/starter-no-infra_cloud-apps01.yml diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml new file mode 100644 index 000000000..70508f2fb --- /dev/null +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -0,0 +1,68 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy ASP.Net Core app to Azure Web App - cloud-apps01 + +on: + push: + branches: + - starter-no-infra + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read #This is required for actions/checkout + + steps: + - uses: actions/checkout@v4 + + - name: Set up .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 'dotnetcore|8' + + - name: Build with dotnet + run: dotnet build --configuration Release + + - name: dotnet publish + run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: .net-app + path: ${{env.DOTNET_ROOT}}/myapp + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: .net-app + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_90D72AC14C0D42C6B79F71CC9F3B04AF }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_9312D2D840AC467BB75612E1D9D80515 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_7B05503C92A641249F2EF3CF3D3AC0A2 }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'cloud-apps01' + slot-name: 'Production' + package: . + \ No newline at end of file From fa0d0fa3fd556e31187ee923ebc650dbc9ba96fd Mon Sep 17 00:00:00 2001 From: pavely12 Date: Mon, 17 Mar 2025 12:25:54 +0200 Subject: [PATCH 02/19] Update --- .../starter-no-infra_cloud-apps01.yml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 70508f2fb..5ed5beffd 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 'dotnetcore|8' + dotnet-version: 'dotnetcore 8.0.x' - name: Build with dotnet run: dotnet build --configuration Release @@ -38,25 +38,25 @@ jobs: deploy: runs-on: ubuntu-latest needs: build - environment: - name: 'Production' + environment: + name: 'Production' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - permissions: - id-token: write #This is required for requesting the JWT - contents: read #This is required for actions/checkout + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout steps: - name: Download artifact from build job uses: actions/download-artifact@v4 with: name: .net-app - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_90D72AC14C0D42C6B79F71CC9F3B04AF }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_9312D2D840AC467BB75612E1D9D80515 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_7B05503C92A641249F2EF3CF3D3AC0A2 }} + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_90D72AC14C0D42C6B79F71CC9F3B04AF }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_9312D2D840AC467BB75612E1D9D80515 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_7B05503C92A641249F2EF3CF3D3AC0A2 }} - name: Deploy to Azure Web App id: deploy-to-webapp @@ -65,4 +65,4 @@ jobs: app-name: 'cloud-apps01' slot-name: 'Production' package: . - \ No newline at end of file + From b82a8d82ce6c80a3b185fcb01202c6e8831b9973 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Mon, 17 Mar 2025 17:57:58 +0200 Subject: [PATCH 03/19] last --- .github/workflows/starter-no-infra_cloud-apps01.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 5ed5beffd..9f3af6768 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -29,6 +29,12 @@ jobs: - name: dotnet publish run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp + - name: Install dotnet ef + run: dotnet tool install --global dotnet-ef --version 8.* + + - name: Create migrations bundle + run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle + - name: Upload artifact for deployment job uses: actions/upload-artifact@v4 with: From 99afd0d85df3272a349aad921c845b1e184bd691 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:29:19 +0200 Subject: [PATCH 04/19] Update starter-no-infra_cloud-apps01.yml --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 9f3af6768..fb183f889 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 'dotnetcore 8.0.x' + dotnet-version: 'dotnetcore 8.*' - name: Build with dotnet run: dotnet build --configuration Release From 928da1c43a04a644f923dfcbece47cef6f4b4a84 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:32:40 +0200 Subject: [PATCH 05/19] last --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index fb183f889..e15308adf 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 'dotnetcore 8.*' + dotnet-version: 'dotnetcore 8.0' - name: Build with dotnet run: dotnet build --configuration Release From b90ae1bdc402488a92168dc32d68db7afcf0ac6f Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:35:12 +0200 Subject: [PATCH 06/19] last1 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index e15308adf..12ef1c3e4 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -30,7 +30,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Install dotnet ef - run: dotnet tool install --global dotnet-ef --version 8.* + run: dotnet tool install --global dotnet-ef --version 8.0 - name: Create migrations bundle run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle From 6326ebe9adecfa896a7aee382899379615219376 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:38:51 +0200 Subject: [PATCH 07/19] last2 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 12ef1c3e4..e15308adf 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -30,7 +30,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Install dotnet ef - run: dotnet tool install --global dotnet-ef --version 8.0 + run: dotnet tool install --global dotnet-ef --version 8.* - name: Create migrations bundle run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle From 6c369008e9a7899807aaa02b10314c6f438e1d45 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:42:50 +0200 Subject: [PATCH 08/19] Update starter-no-infra_cloud-apps01.yml --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index e15308adf..12ef1c3e4 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -30,7 +30,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Install dotnet ef - run: dotnet tool install --global dotnet-ef --version 8.* + run: dotnet tool install --global dotnet-ef --version 8.0 - name: Create migrations bundle run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle From 4120698cec71325b5d71f0d56566ef4a4c6d5b28 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:50:57 +0200 Subject: [PATCH 09/19] lst --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 12ef1c3e4..17e7cffb4 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 'dotnetcore 8.0' + dotnet-version: dotnetcore '8.0' - name: Build with dotnet run: dotnet build --configuration Release From 0f9b861c438b744674230c8b18149ba112795ac8 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:52:22 +0200 Subject: [PATCH 10/19] lst1 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 17e7cffb4..624139d43 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -30,7 +30,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Install dotnet ef - run: dotnet tool install --global dotnet-ef --version 8.0 + run: dotnet tool install --global dotnet-ef --version 8.x - name: Create migrations bundle run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle From 7f86fa4151a8a6a4561476ccc8ad577fb5a6a056 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:53:25 +0200 Subject: [PATCH 11/19] lst2 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 624139d43..38e64645a 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore '8.0' + dotnet-version: dotnetcore '8.0.0' - name: Build with dotnet run: dotnet build --configuration Release From 0b81a05d0a4120b1cedb3f0d115b9a2624bd5dba Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 07:58:10 +0200 Subject: [PATCH 12/19] lst3 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 38e64645a..bb5a5c105 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore '8.0.0' + dotnet-version: dotnetcore 8.0 - name: Build with dotnet run: dotnet build --configuration Release From 360c28e1a16f229c0f949fd868e7b5bf064ce889 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:01:03 +0200 Subject: [PATCH 13/19] lst --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index bb5a5c105..65f899089 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore 8.0 + dotnet-version: dotnetcore 8.x - name: Build with dotnet run: dotnet build --configuration Release From 8760ee379f78aa23281b3d7af45480065fc89305 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:03:26 +0200 Subject: [PATCH 14/19] lst1 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 65f899089..3ecff92fb 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore 8.x + dotnet-version: dotnetcore 8.0.x - name: Build with dotnet run: dotnet build --configuration Release From fa920643922b7321b7dfa09d6bec156831290562 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:01:25 +0000 Subject: [PATCH 15/19] cs --- Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index ffa365722..fd871607d 100644 --- a/Program.cs +++ b/Program.cs @@ -47,4 +47,4 @@ name: "default", pattern: "{controller=Todos}/{action=Index}/{id?}"); -app.Run(); +app.Run(); \ No newline at end of file From 48a3bb423f2093972dcac5835829d05a3a81c129 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:10:24 +0000 Subject: [PATCH 16/19] dnet --- .github/workflows/starter-no-infra_cloud-apps01.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 3ecff92fb..3ec05affc 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore 8.0.x + dotnet-version: dotnetcore 8.0 - name: Build with dotnet run: dotnet build --configuration Release @@ -71,4 +71,4 @@ jobs: app-name: 'cloud-apps01' slot-name: 'Production' package: . - + \ No newline at end of file From 3de8e60ef2d35cf271bdb7bdca91d1b2af662b55 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:20:15 +0000 Subject: [PATCH 17/19] dnet1 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 3ec05affc..05d617d99 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore 8.0 + dotnet-version: dotnetcore 8.0.0 - name: Build with dotnet run: dotnet build --configuration Release From 251464f3cce5a45bd66290c7c7b73d4ed3eb48e4 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:25:26 +0000 Subject: [PATCH 18/19] dnet2 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index 05d617d99..de5cef916 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -21,7 +21,7 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: dotnetcore 8.0.0 + dotnet-version: 8.0 - name: Build with dotnet run: dotnet build --configuration Release From 0d2aa25ab43f08bf3ea7c3663ad9d98dc57a08b0 Mon Sep 17 00:00:00 2001 From: pavely12 Date: Tue, 18 Mar 2025 08:29:21 +0000 Subject: [PATCH 19/19] dnet3 --- .github/workflows/starter-no-infra_cloud-apps01.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/starter-no-infra_cloud-apps01.yml b/.github/workflows/starter-no-infra_cloud-apps01.yml index de5cef916..4d295956d 100644 --- a/.github/workflows/starter-no-infra_cloud-apps01.yml +++ b/.github/workflows/starter-no-infra_cloud-apps01.yml @@ -30,7 +30,7 @@ jobs: run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp - name: Install dotnet ef - run: dotnet tool install --global dotnet-ef --version 8.x + run: dotnet tool install --global dotnet-ef --version 8.0.0 - name: Create migrations bundle run: dotnet ef migrations bundle --runtime linux-x64 -o ${{env.DOTNET_ROOT}}/myapp/migrationsbundle