Skip to content

feat: Add initial Dockerfile, Pipfile.lock, and Terraform example for… #194

feat: Add initial Dockerfile, Pipfile.lock, and Terraform example for…

feat: Add initial Dockerfile, Pipfile.lock, and Terraform example for… #194

Workflow file for this run

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 }}