-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (28 loc) · 929 Bytes
/
Copy pathdocker-image.yml
File metadata and controls
34 lines (28 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 }}"'