Bump azure/webapps-deploy from 8db8b8d14f21b245e6706fd0607244e354884697 to 45c7df8f6a4fe841b67ff88920b33f4f8328f8d9 #191
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| SRC_PROJECT_PATH: '/webapp01/webapp01.csproj' | |
| AZURE_WEBAPP_PACKAGE_PATH: './src' # set this to the path to your web app project, defaults to the repository root | |
| DOTNET_VERSION: '9.0.x' # set this to the dot net version to use | |
| imageName: "webapp01" | |
| tag: ${{ github.sha }} | |
| jobs: | |
| ci_build: | |
| name: Build Web App | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repo | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Setup .NET Core SDK | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| # Run dotnet build | |
| - name: dotnet build | |
| run: | | |
| dotnet restore ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}${{ env.SRC_PROJECT_PATH }} | |
| dotnet build --configuration Release ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}${{ env.SRC_PROJECT_PATH }} | |
| - name: Build the Docker image | |
| run: docker build ./src/webapp01 --file ./src/webapp01/Dockerfile --tag ${{ env.imageName }}:${{ env.tag }} |