Move example to separate folder #53
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 & Publish Container | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install .NET 9 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Run tests | |
| run: dotnet test | |
| - name: Build & push container to Docker Hub | |
| env: | |
| DOTNET_CONTAINER_REGISTRY_UNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOTNET_CONTAINER_REGISTRY_PWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| run: | | |
| dotnet publish "src/BF2WebAdmin.Server/BF2WebAdmin.Server.csproj" \ | |
| -c Release \ | |
| -t:PublishContainer \ | |
| -p:RuntimeIdentifier=linux-x64 \ | |
| -p:ContainerRegistry=docker.io \ | |
| -p:ContainerRepository=nihlen/bf2-webadmin \ | |
| -p:ContainerImageTags='"latest;sha-${{ github.sha }}"' |