From a094d52009fb4feb1d1b98889abb47438a6637e7 Mon Sep 17 00:00:00 2001 From: meide-hbs <76456683+meide-hbs@users.noreply.github.com> Date: Thu, 18 Sep 2025 07:55:06 -0500 Subject: [PATCH 1/2] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_trms-test.yml | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/main_trms-test.yml diff --git a/.github/workflows/main_trms-test.yml b/.github/workflows/main_trms-test.yml new file mode 100644 index 00000000..bfed0e89 --- /dev/null +++ b/.github/workflows/main_trms-test.yml @@ -0,0 +1,65 @@ +# 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 - trms-test + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: windows-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: '8.x' + + - 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: windows-latest + needs: build + 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_9AFBDD31E7DF426095DC5A669A5360A2 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_A2B2653DE05F40678F1B5A960ACC5576 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F9300B9BFB0748F4896BA8AE4201142D }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'trms-test' + slot-name: 'Production' + package: . + \ No newline at end of file From 8825755900d6f3f1bad5ed923551a8288fdb7187 Mon Sep 17 00:00:00 2001 From: meide-hbs <76456683+meide-hbs@users.noreply.github.com> Date: Thu, 18 Sep 2025 08:11:01 -0500 Subject: [PATCH 2/2] Remove the Azure App Service build and deployment workflow config --- .github/workflows/main_trms-test.yml | 65 ---------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/main_trms-test.yml diff --git a/.github/workflows/main_trms-test.yml b/.github/workflows/main_trms-test.yml deleted file mode 100644 index bfed0e89..00000000 --- a/.github/workflows/main_trms-test.yml +++ /dev/null @@ -1,65 +0,0 @@ -# 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 - trms-test - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: windows-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: '8.x' - - - 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: windows-latest - needs: build - 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_9AFBDD31E7DF426095DC5A669A5360A2 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_A2B2653DE05F40678F1B5A960ACC5576 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F9300B9BFB0748F4896BA8AE4201142D }} - - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v3 - with: - app-name: 'trms-test' - slot-name: 'Production' - package: . - \ No newline at end of file