Repository navigation
Build and Containerize Demo #2
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: Build and Containerize Demo | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - Week5/CSTester/** | |
| jobs: | |
| Compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout - get the source code | |
| uses: actions/checkout@v5.0.0 | |
| - name: Setup .NET Core SDK | |
| uses: actions/setup-dotnet@v5.0.0 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Dotnet Restore | |
| run: dotnet restore ./Week5/CSTester/ | |
| - name: Dotnet Build | |
| run: dotnet build --no-restore ./Week5/CSTester/ | |
| Containerize: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout - get the source code | |
| uses: actions/checkout@v5.0.0 | |
| - name: Docker Setup Buildx | |
| uses: docker/setup-buildx-action@v3.11.1 | |
| - name: Docker Build | |
| run: docker build --tag CSTester:latest -f ./Week5/CSTester/Dockerfile ./Week5/CSTester | |