Compare commits

...

5 Commits

Author SHA1 Message Date
7e449575ed fix arm64 build
All checks were successful
Master Build / Build and Push Docker Image (amd64) (push) Successful in 2m14s
Master Build / Build and Push Docker Image (arm64) (push) Successful in 4m5s
Master Build / Update running container (push) Successful in 1m15s
2025-01-19 11:34:01 -03:00
7c556c3bd7 attempt
Some checks failed
Master Build / Build and Push Docker Image (arm64) (push) Has been cancelled
Master Build / Update running container (push) Has been cancelled
Master Build / Build and Push Docker Image (amd64) (push) Has been cancelled
2025-01-19 11:24:35 -03:00
e18aacd98b gitea changes
Some checks failed
Master Build / Build and Push Docker Image (amd64) (push) Failing after 54s
Master Build / Build and Push Docker Image (arm64) (push) Failing after 6m41s
Master Build / Update running container (push) Has been skipped
2025-01-19 11:10:01 -03:00
b68a65386e adding gitea flows
Some checks failed
Master Build / Build and Push Docker Image (amd64) (push) Failing after 1m24s
Master Build / Build and Push Docker Image (arm64) (push) Failing after 18s
Master Build / Update running container (push) Has been skipped
2025-01-19 11:05:10 -03:00
3a2fc750a0 updating nugets 2025-01-19 11:05:00 -03:00
4 changed files with 138 additions and 4 deletions

26
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,26 @@
name: CI
on:
# push:
# branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-build --verbosity normal

108
.gitea/workflows/master.yml Normal file
View File

@@ -0,0 +1,108 @@
name: Master Build
on:
push:
branches: [ "master" ]
jobs:
build_amd64:
name: Build and Push Docker Image (amd64)
runs-on: self-hosted-ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install docker and docker compose
run: |
apt update
apt install -y docker docker-compose
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3.3.0
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: https://github.com/docker/setup-buildx-action@v3.8.0
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build Docker image and push
id: docker_build
uses: https://github.com/docker/build-push-action@v6.12.0
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/kasbot:latest
platforms: linux/amd64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
build_arm64:
name: Build and Push Docker Image (arm64)
runs-on: self-hosted-ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install docker and docker compose
run: |
apt update
apt install -y docker docker-compose
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Set up QEMU
uses: https://github.com/docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: https://github.com/docker/setup-buildx-action@v3.8.0
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build Docker image and push
id: docker_build
uses: https://github.com/docker/build-push-action@v6.12.0
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: self-hosted-ubuntu-latest
needs: build_arm64
steps:
- name: Recreate container
uses: https://github.com/appleboy/ssh-action@v1.2.0
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

@@ -16,7 +16,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -14,7 +14,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Discord.Net" Version="3.16.0" /> <PackageReference Include="Discord.Net" Version="3.17.1" />
<PackageReference Include="Google.Protobuf" Version="3.25.1" /> <PackageReference Include="Google.Protobuf" Version="3.25.1" />
<PackageReference Include="Grpc.AspNetCore" Version="2.59.0" /> <PackageReference Include="Grpc.AspNetCore" Version="2.59.0" />
<PackageReference Include="Grpc.Net.Client" 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.Enrichers.Context" Version="4.6.5" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" /> <PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="SpotifyAPI.Web" Version="7.1.1" /> <PackageReference Include="SpotifyAPI.Web" Version="7.2.1" />
<PackageReference Include="YoutubeExplode" Version="6.4.3" /> <PackageReference Include="YoutubeExplode" Version="6.5.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>