diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml
index 57cf1b0..54ab8c1 100644
--- a/.github/workflows/build-image.yml
+++ b/.github/workflows/build-image.yml
@@ -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 }}
\ No newline at end of file
+ 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 }}
\ No newline at end of file
diff --git a/Core/Core.csproj b/Core/Core.csproj
index 11d7178..bb41840 100644
--- a/Core/Core.csproj
+++ b/Core/Core.csproj
@@ -1,22 +1,22 @@
- net5.0
+ net6.0
TelegramBot
Kruzya.TelegramBot.Core
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
diff --git a/docker/Dockerfile.amd64 b/docker/Dockerfile.amd64
index a0f24e4..d8ae3d8 100644
--- a/docker/Dockerfile.amd64
+++ b/docker/Dockerfile.amd64
@@ -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
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.arm64
similarity index 92%
rename from docker/Dockerfile.aarch64
rename to docker/Dockerfile.arm64
index fad6347..5499b48 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.arm64
@@ -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
diff --git a/modules/ChatManagement/ChatManagement.csproj b/modules/ChatManagement/ChatManagement.csproj
index dc8f81f..ff72078 100644
--- a/modules/ChatManagement/ChatManagement.csproj
+++ b/modules/ChatManagement/ChatManagement.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.ChatManagement
West.TelegramBot.ChatManagement
diff --git a/modules/CombotAntiSpam/CombotAntiSpam.csproj b/modules/CombotAntiSpam/CombotAntiSpam.csproj
index ada4e7e..e2f3e82 100644
--- a/modules/CombotAntiSpam/CombotAntiSpam.csproj
+++ b/modules/CombotAntiSpam/CombotAntiSpam.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.CombotAntiSpam
Kruzya.TelegramBot.CombotAntiSpam
diff --git a/modules/Destiny2.WhereIsXur/Destiny2.WhereIsXur.csproj b/modules/Destiny2.WhereIsXur/Destiny2.WhereIsXur.csproj
index eb91cf1..1e8fa06 100644
--- a/modules/Destiny2.WhereIsXur/Destiny2.WhereIsXur.csproj
+++ b/modules/Destiny2.WhereIsXur/Destiny2.WhereIsXur.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.D2_WhereIsXur
Kruzya.TelegramBot.Destiny2.WhereIsXur
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/modules/Entertainment/Entertainment.csproj b/modules/Entertainment/Entertainment.csproj
index 609decc..5a62490 100644
--- a/modules/Entertainment/Entertainment.csproj
+++ b/modules/Entertainment/Entertainment.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.Entertainment
West.Entertainment
diff --git a/modules/RichSiteSummary/RichSiteSummary.csproj b/modules/RichSiteSummary/RichSiteSummary.csproj
index c82745b..7341b84 100644
--- a/modules/RichSiteSummary/RichSiteSummary.csproj
+++ b/modules/RichSiteSummary/RichSiteSummary.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.RichSiteSummary
Kruzya.TelegramBot.RichSiteSummary
@@ -11,7 +11,7 @@
-
+
diff --git a/modules/UrlLimitations/UrlLimitations.csproj b/modules/UrlLimitations/UrlLimitations.csproj
index 2a7e32e..09c082d 100644
--- a/modules/UrlLimitations/UrlLimitations.csproj
+++ b/modules/UrlLimitations/UrlLimitations.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.UrlLimitations
Kruzya.TelegramBot.UrlLimitations
diff --git a/modules/UserGroupTag/UserGroupTag.csproj b/modules/UserGroupTag/UserGroupTag.csproj
index 686ce30..2c5932d 100644
--- a/modules/UserGroupTag/UserGroupTag.csproj
+++ b/modules/UserGroupTag/UserGroupTag.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
TelegramBot.UserGroupTag
diff --git a/tests/Tests.csproj b/tests/Tests.csproj
index 5e99fe4..d25df7c 100644
--- a/tests/Tests.csproj
+++ b/tests/Tests.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
false
@@ -11,9 +11,9 @@
-
-
-
+
+
+