-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.2 KB
/
RecommendationAlgoPipeline.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
name: RecommendationAlgo Build Test N Publish
on:
push:
branches: [ "main" ]
paths:
- 'Backend/RecommendationAlgo/**'
pull_request:
branches: [ "main" ]
paths:
- 'Backend/RecommendationAlgo/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore Backend/RecommendationAlgo/RecommendationAlgo.csproj
- name: Build
run: dotnet build Backend/RecommendationAlgo/RecommendationAlgo.csproj --no-restore
- name: Test
run: dotnet test Backend/RecommendationAlgo/RecommendationAlgo.csproj --no-build --verbosity normal
- name: Log in to DockerHub
uses: docker/login-action@v1
if: success()
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
if: success()
with:
context: ./Backend/
file: Backend/RecommendationAlgo/Dockerfile
push: true
tags: openvidstreamer/recommendationalgo:latest