Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
realwoopee committed Aug 22, 2021
2 parents 680714d + f0dd1d6 commit 3736b69
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/dotnetcore-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Get tag version
id: get_version
run: echo ::set-env name=TAG_NAME::$(echo ${GITHUB_REF/refs\/tags\//})
- name: Setup .NET Core SDK
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
dotnet-version: 5.0.400
- name: Build .NET Core App
run: dotnet publish dotnet-app/APIL/WordCounterBot.APIL.WebApi.csproj -c Release -o ./app
- name: Build & Publish Docker image
if: success()
uses: opspresso/[email protected].1
uses: opspresso/[email protected].17
env:
USERNAME: ${{ secrets.DOCKER_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: "admiralwoop/multi-purpose-tg-bot"
LATEST: "true"
- name: Notify MicroBadger
if: success()
run: curl -X POST https://hooks.microbadger.com/images/admiralwoop/multi-purpose-tg-bot/LPihsqNbWfnJYRdtST6fL5NyRmc=
6 changes: 3 additions & 3 deletions .github/workflows/dotnetcore-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
dotnet-version: 5.0.400
- name: Build API layer
run: dotnet build dotnet-app/APIL/WordCounterBot.APIL.WebApi.csproj -c Release -o ./app
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim
WORKDIR /app
COPY /app .
ENTRYPOINT ["dotnet", "WordCounterBot.APIL.WebApi.dll"]
ENTRYPOINT ["dotnet", "WordCounterBot.APIL.WebApi.dll"]
6 changes: 3 additions & 3 deletions Dockerfile.with-build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["dotnet-app/APIL/WordCounterBot.APIL.WebApi.csproj", "APIL/"]
COPY ["dotnet-app/BLL/WordCounterBot.BLL.Core/WordCounterBot.BLL.Core.csproj", "BLL/WordCounterBot.BLL.Core/"]
Expand All @@ -20,4 +20,4 @@ RUN dotnet publish "WordCounterBot.APIL.WebApi.csproj" -c Release -o /app/publis
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WordCounterBot.APIL.WebApi.dll"]
ENTRYPOINT ["dotnet", "WordCounterBot.APIL.WebApi.dll"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Multi-purpose Telegram Bot
======
![](https://img.shields.io/github/v/release/admiralwoop/multi-purpose-tg-bot?include_prereleases&sort=semver)
[![](https://img.shields.io/badge/docker%20hub-099cec)](https://hub.docker.com/r/admiralwoop/multi-purpose-tg-bot)

![](https://img.shields.io/github/last-commit/admiralWoop/multi-purpose-tg-bot/master)
[![](https://www.codefactor.io/repository/github/admiralwoop/multi-purpose-tg-bot/badge)](https://www.codefactor.io/repository/github/admiralwoop/multi-purpose-tg-bot)

[![](https://images.microbadger.com/badges/version/admiralwoop/multi-purpose-tg-bot.svg)](https://microbadger.com/images/admiralwoop/multi-purpose-tg-bot)
[![](https://img.shields.io/badge/docker%20hub-099cec)](https://hub.docker.com/r/admiralwoop/multi-purpose-tg-bot)
**Multi-purpose Telegram Bot** is a telegram bot based on ASP.NET Core & [Telegram.Bot](https://github.com/TelegramBots/Telegram.Bot).

**Multi-purpose Telegram Bot** is a telegram bot inside a ASP.NET Core app.
The main idea of this bot is use of filter-handler architecture similar to ASP.NET routes and controllers.

The main idea of this bot is use of a architecture where bot uses filters and corresponding handlers to handle updates received from Telegram.
That way you don't need to put all your logic in a single controller.

That way you don't need to have single handler that handles all kinds of messages.
What you have is **the** router and many filters that decide what handler will handle new received message. Thus handlers have only one responsibility - get some information from a message and do something with it.
What you have is a single router and many filters that decide what handler will with a received message. Thus handlers have only one responsibility - get some information from the message and do something based on that info.

### Third party libraries
* [Telegram.Bot library](https://github.com/TelegramBots/Telegram.Bot)
Expand Down

0 comments on commit 3736b69

Please sign in to comment.