Merge branch 'main' of https://github.com/raga70/OpenVidStreamer #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Build Test N Publish | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'Backend/Upload/**' | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- 'Backend/Upload/**' | |
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/Upload/Upload.csproj | |
- name: Build | |
run: dotnet build Backend/Upload/Upload.csproj --no-restore | |
- name: Test | |
run: dotnet test Backend/Upload/Upload.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/Upload/Dockerfile | |
push: true | |
tags: openvidstreamer/upload:latest |