Maybe like this #39
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: | ||
| # set these in your repo secrets | ||
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
| run: | | ||
|
Check failure on line 28 in .github/workflows/docker-image.yml
|
||
| dotnet publish -c Release \ | ||
| -p:ContainerRegistry=docker.io \ | ||
| -p:ContainerRepository=nihlen/bf2-webadmin \ | ||
| -p:ContainerImageTags="latest,sha-${{ substring(github.sha, 0, 8) }}" \ | ||
| -p:ContainerPush=true | ||