Skip to content

updated dockerfiles

updated dockerfiles #3

name: VideoLibrarry Build Test N Publish
on:
push:
branches: [ "main" ]
paths:
- 'Backend/VideoLibrary/**'
pull_request:
branches: [ "main" ]
paths:
- 'Backend/VideoLibrary/**'
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/VideoLibrary/VideoLibrary.csproj
- name: Build
run: dotnet build Backend/VideoLibrary/VideoLibrary.csproj --no-restore
- name: Test
run: dotnet test Backend/VideoLibrary/VideoLibrary.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: .
file: Backend/VideoLibrary/Dockerfile
push: true
tags: openvidstreamer/videolibrary:latest