From 1df10719daa44b9993a4e3f25f1f740afaf3b32c Mon Sep 17 00:00:00 2001 From: LuisMSuarez <140195810+LuisMSuarez@users.noreply.github.com> Date: Thu, 18 Sep 2025 14:16:24 -0700 Subject: [PATCH] Update CI-build.yml --- .github/workflows/CI-build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/CI-build.yml b/.github/workflows/CI-build.yml index 0fe097d..f469d48 100644 --- a/.github/workflows/CI-build.yml +++ b/.github/workflows/CI-build.yml @@ -63,3 +63,26 @@ jobs: push: ${{ github.event_name == 'push' }} # always build the container (incl. Pull Requests), but only push to the registry on code push tags: ${{ env.REGISTRY }}/${{ env.REPO }}:${{ github.sha }} file: ./Dockerfile + deploy-container: + if: github.event_name == 'push' # Only deploy on push events + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp-container.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout + + steps: + - name: Lowercase the repo name and username as container tags must be lowercase + run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} + + - name: Deploy to Azure Web App + id: deploy-to-webapp-container + uses: azure/webapps-deploy@v2 + with: + app-name: 'botio' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_CONTAINER_PUBLISH_PROFILE }} + images: '${{ env.REGISTRY }}/${{ env.REPO }}:${{ github.sha }}'