Compare commits

...

4 Commits

Author SHA1 Message Date
fd0bab1c78 fixing pipeline
All checks were successful
Master Build / Build and Push Docker Image (arm64 and amd64) (push) Successful in 3m49s
2025-09-18 16:49:59 -03:00
31e2601e69 updating lib 2025-09-17 19:27:47 -03:00
12123b2a92 updating docker things 2025-06-17 10:32:49 -03:00
cd485fa698 updating things 2025-06-17 10:30:06 -03:00
5 changed files with 18 additions and 73 deletions

View File

@@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8
- name: Restore dependencies
run: dotnet restore
- name: Build

View File

@@ -5,93 +5,38 @@ on:
branches: [ "master" ]
jobs:
build_amd64:
name: Build and Push Docker Image (amd64)
build_multiarch:
name: Build and Push Docker Image (arm64 and amd64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: git.ivanch.me
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build Docker image and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/kasbot:latest
platforms: linux/amd64
tags: git.ivanch.me/ivanch/kasbot/kasbot:latest
platforms: linux/arm64,linux/amd64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
build_arm64:
name: Build and Push Docker Image (arm64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build Docker image and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/kasbot:latest
platforms: linux/arm64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
deploy:
name: Update running container
runs-on: ubuntu-latest
needs: build_arm64
steps:
- name: Recreate container
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd docker/kasbot
docker-compose down
docker-compose rm
docker-compose pull
docker-compose up -d

View File

@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /App
# Copy everything
@@ -14,7 +14,7 @@ RUN dotnet restore
RUN dotnet build -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN apt update && apt install -y ffmpeg libopus-dev opus-tools libsodium-dev
WORKDIR /App

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>a8c1813f-fb5a-4771-868e-60e280ccaf77</UserSecretsId>

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
@@ -14,7 +14,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Discord.Net" Version="3.16.0" />
<PackageReference Include="Discord.Net" Version="3.18.0" />
<PackageReference Include="Google.Protobuf" Version="3.25.1" />
<PackageReference Include="Grpc.AspNetCore" Version="2.59.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.59.0" />
@@ -27,8 +27,8 @@
<PackageReference Include="Serilog.Enrichers.Context" Version="4.6.5" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="SpotifyAPI.Web" Version="7.1.1" />
<PackageReference Include="YoutubeExplode" Version="6.4.3" />
<PackageReference Include="SpotifyAPI.Web" Version="7.2.1" />
<PackageReference Include="YoutubeExplode" Version="6.5.4" />
</ItemGroup>
<ItemGroup>