Skip to content

Long SHA

Long SHA #47

Workflow file for this run

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: |
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;${{ github.sha }}"'
--no-self-contained