mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Bump to .NET 6. Add arm64 image build. Use short commit hash on image tag.
This commit is contained in:
@@ -2,13 +2,15 @@
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build Docker image
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ['amd64', 'arm64']
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
@@ -27,11 +29,17 @@ jobs:
|
||||
registry: ${{ secrets.REGISTRY_URL }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
-
|
||||
name: Get short commit SHA
|
||||
id: commit_sha
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/Dockerfile.amd64
|
||||
push: true
|
||||
tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest,${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ github.sha }}
|
||||
file: docker/Dockerfile.${{ matrix.arch }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
push: ${{ github.ref == 'refs/heads/dev' }}
|
||||
tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest,
|
||||
|${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ steps.commit_sha.outputs.sha_short }}
|
||||
+7
-7
@@ -1,22 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot</AssemblyName>
|
||||
<RootNamespace>Kruzya.TelegramBot.Core</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Core' " />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AleXr64.BotFramework" Version="0.6.5-g35decc8b27" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.13">
|
||||
<PackageReference Include="AleXr64.BotFramework" Version="0.6.8-g0882b76d16" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.13" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="5.0.1" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="6.0.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Build a project
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0.404-alpine3.14-amd64 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.1-alpine3.14-amd64 AS build
|
||||
WORKDIR /source
|
||||
|
||||
# Copy project and perform restoring
|
||||
@@ -23,7 +23,7 @@ RUN dotnet publish -c release -o /app --no-restore Kruzya.TelegramBot.sln && \
|
||||
rm -f /app/TelegramBot.*.dll /app/TelegramBot.*.pdb
|
||||
|
||||
# Now reuse image with only runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0.13-alpine3.14-amd64
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.1-alpine3.14-amd64
|
||||
WORKDIR /user
|
||||
COPY --from=build /app /app
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Build a project
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0.404-buster-slim-arm64v8 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.1-alpine3.14-arm64v8 AS build
|
||||
WORKDIR /source
|
||||
|
||||
# Copy project and perform restoring
|
||||
@@ -23,7 +23,7 @@ RUN dotnet publish -c release -o /app --no-restore Kruzya.TelegramBot.sln && \
|
||||
rm -f /app/TelegramBot.*.dll /app/TelegramBot.*.pdb
|
||||
|
||||
# Now reuse image with only runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0.13-alpine3.14-arm64v8
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.1-alpine3.14-arm64v8
|
||||
WORKDIR /user
|
||||
COPY --from=build /app /app
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.ChatManagement</AssemblyName>
|
||||
<RootNamespace>West.TelegramBot.ChatManagement</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.CombotAntiSpam</AssemblyName>
|
||||
<RootNamespace>Kruzya.TelegramBot.CombotAntiSpam</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.D2_WhereIsXur</AssemblyName>
|
||||
<RootNamespace>Kruzya.TelegramBot.Destiny2.WhereIsXur</RootNamespace>
|
||||
</PropertyGroup>
|
||||
@@ -11,8 +11,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Fizzler.Systems.HtmlAgilityPack" Version="1.2.0" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.21" />
|
||||
<PackageReference Include="Fizzler.Systems.HtmlAgilityPack" Version="1.2.1" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.39" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.Entertainment</AssemblyName>
|
||||
<RootNamespace>West.Entertainment</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.RichSiteSummary</AssemblyName>
|
||||
<RootNamespace>Kruzya.TelegramBot.RichSiteSummary</RootNamespace>
|
||||
</PropertyGroup>
|
||||
@@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.1" />
|
||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.UrlLimitations</AssemblyName>
|
||||
<RootNamespace>Kruzya.TelegramBot.UrlLimitations</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>TelegramBot.UserGroupTag</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="nunit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
||||
<PackageReference Include="nunit" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0-preview-20211130-02" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user