Pipeline and licensing added.

This commit is contained in:
2025-07-05 18:18:54 +02:00
parent 100eb20299
commit fd1995bf7b
5 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,26 @@
name: Build and Push Docker Image
on:
push:
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:9.0
steps:
- name: Install Node.js and dependencies
run: |
apt-get update
apt-get install -y curl gnupg
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs git
- name: Checkout
uses: actions/checkout@v3
- name: Restore dependencies
run: dotnet restore ./code/messengerapi.Broker/MessengerBroker.csproj
- name: Build project
run: dotnet build ./code/messengerapi.Broker/MessengerBroker.csproj -c Release

View File

@ -0,0 +1,23 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Docker login
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login https://gitea.masita.net -u mc --password-stdin
- name: Build and push Docker image
run: |
IMAGE=gitea.masita.net/mc/messengerbroker:latest
docker build -t $IMAGE .
docker push $IMAGE

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2025 Ondrej Masita
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

15
NuGet.config Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="mc" value="https://gitea.masita.net/api/packages/mc/nuget/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="mc">
<package pattern="portaloggy" />
</packageSource>
</packageSourceMapping>
</configuration>

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
services:
messengerapi:
image: https://gitea.masita.net/mc/messengerbroker:latest
container_name: messengerbroker
restart: unless-stopped
environment:
- ASPNETCORE_ENVIRONMENT=Production