Fixes!
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elias Jansson
2025-06-03 00:04:28 +02:00
parent 628f25a8be
commit 4c60508d6d
2 changed files with 37 additions and 5 deletions

View File

@@ -4,9 +4,9 @@ name: default
steps:
- name: build-dotnet
image: mcr.microsoft.com/dotnet/sdk:6.0
image: alpine
commands:
- dotnet publish Aberwyn/Aberwyn.csproj -c Release -o out
- echo "Docker build will handle dotnet publish"
- name: build-docker
image: plugins/docker
@@ -18,6 +18,37 @@ steps:
password:
from_secret: gitea_token
dockerfile: Aberwyn/Dockerfile
context: Aberwyn
context: .
tags:
- latest
insecure: true
- name: restart-unraid-container
image: appleboy/drone-ssh
settings:
host: 192.168.1.108
port: 22
username:
from_secret: unraid_ssh_user
key:
from_secret: unraid_ssh_private_key
script:
- docker pull 192.168.1.9:3000/tai/aberwyn/aberwyn:latest
- docker stop Aberwyn || true
- docker rm Aberwyn || true
- docker run -d --name='Aberwyn' --net='br0' -e TZ='Europe/Berlin' -p 80:80 192.168.1.9:3000/tai/aberwyn/aberwyn:latest
- name: notify-result
image: alpine
when:
status:
- success
- failure
commands:
- apk add --no-cache curl
- |
if [ "$DRONE_BUILD_STATUS" = "success" ]; then
curl -X POST http://192.168.1.196:8123/api/webhook/aberwyn_update_success
else
curl -X POST http://192.168.1.196:8123/api/webhook/aberwyn_update_failed
fi

View File

@@ -15,9 +15,10 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Aberwyn/Aberwyn.csproj", "."]
COPY ["Aberwyn/Aberwyn.csproj", "Aberwyn/"]
WORKDIR /src/Aberwyn
RUN dotnet restore "Aberwyn.csproj"
COPY . .
COPY Aberwyn/. .
RUN dotnet build "Aberwyn.csproj" -c Release -o /app/build
FROM build AS publish