diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9be03cf..f60e27a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: shell: pwsh run: | $srcPath = Join-Path (Pwd) src - docker run -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:6.0.405-alpine3.16 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output" + docker run -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output" build-docker: runs-on: ubuntu-latest @@ -35,5 +35,6 @@ jobs: if ('${{ matrix.architecture }}' -eq 'arm64v8') { sudo apt-get install qemu binfmt-support qemu-user-static docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + sed -i 's/8.0.100-1-alpine3.18/8.0.100-alpine3.18/' Dockerfile } docker build . --build-arg ARCH=${{ matrix.architecture }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index b88c6ae..3ef5e6e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -26,7 +26,7 @@ jobs: $uid = sh -c 'id -u' $gid = sh -c 'id -g' - docker run -v "$($outputPath):/var/output" -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:6.0.405-alpine3.16 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output && chown -R $($uid):$($gid) /var/output" + docker run -v "$($outputPath):/var/output" -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output && chown -R $($uid):$($gid) /var/output" Push-Location $outputPath chmod +r * @@ -98,6 +98,7 @@ jobs: if ('${{ matrix.architecture }}' -eq 'arm64v8') { sudo apt-get install qemu binfmt-support qemu-user-static docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + sed -i 's/8.0.100-1-alpine3.18/8.0.100-alpine3.18/' Dockerfile } docker build . -t ghcr.io/g3rv4/getmoarfediverse:latest-${{ matrix.architecture }} --build-arg ARCH=${{ matrix.architecture }} diff --git a/Dockerfile b/Dockerfile index ad32da0..4e7cd52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:1 ARG ARCH= -FROM mcr.microsoft.com/dotnet/sdk:6.0.405-alpine3.16-${ARCH} AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18-${ARCH} AS builder WORKDIR /src COPY src /src/ RUN dotnet publish -c Release /src/GetMoarFediverse.csproj -o /app -FROM mcr.microsoft.com/dotnet/aspnet:6.0.13-alpine3.16-${ARCH} +FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-alpine3.18-${ARCH} VOLUME ["/data"] ENV CONFIG_PATH=/data/config.json COPY --from=builder /app /app diff --git a/src/GetMoarFediverse.csproj b/src/GetMoarFediverse.csproj index 3ee31cf..c93641b 100644 --- a/src/GetMoarFediverse.csproj +++ b/src/GetMoarFediverse.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 enable enable true