-
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (54 loc) · 1.67 KB
/
build.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: dotnet package
on:
push:
branches:
- main
paths:
- 'src/**/*.cs*'
- 'Dockerfile'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET SDK 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --no-build --verbosity minimal --logger trx
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Test results # Name of the check run which will be created
path: tests/**/TestResults/*.trx # Path to test results
reporter: dotnet-trx # Format of test results
list-tests: failed # Only list failed tests vs all tests
docker:
runs-on: ubuntu-latest
needs: [test]
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ghcr.io/svrooij/dotnet-feeder:latest