From 951f0bc82faa89694e11df1220e04af25e8991b5 Mon Sep 17 00:00:00 2001 From: Sellara <147769367+Sella-GH@users.noreply.github.com> Date: Sun, 24 Nov 2024 00:34:20 +0100 Subject: [PATCH] Another big ci change (#230) --- .github/workflows/codeql.yml | 6 +++--- .github/workflows/dotnet-release-publish.yml | 7 ++++--- .github/workflows/dotnet.yml | 7 ++++--- dev.Dockerfile | 3 ++- dev.alpine.Dockerfile | 3 ++- release.Dockerfile | 3 ++- release.alpine.Dockerfile | 3 ++- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e65edb46..ecabf73e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -82,10 +82,10 @@ jobs: with: dotnet-version: '9' - - name: Build And Publish + - name: Restore And Build run: | - dotnet restore --configfile ./Nuget.config --force --no-cache --ucr - dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Release --ucr + dotnet restore /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr + dotnet build /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Release --no-incremental --no-restore --no-self-contained --ucr - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dotnet-release-publish.yml b/.github/workflows/dotnet-release-publish.yml index 260f85cd..8d850e89 100644 --- a/.github/workflows/dotnet-release-publish.yml +++ b/.github/workflows/dotnet-release-publish.yml @@ -88,10 +88,11 @@ jobs: # - name: Install GitHub CLI # run: sudo apt-get update && sudo apt-get install -y gh - # - name: Publish Bot Release + # - name: Restore, Build And Publish # run: | - # dotnet restore --configfile ./Nuget.config --force --no-cache --ucr - # dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Release --ucr + # dotnet restore /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr + # dotnet build /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Release --no-incremental --no-restore --no-self-contained --ucr + # dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Release --no-build --no-restore --no-self-contained --ucr # #- name: Download and extract Lavalink # # run: | diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ef10d75b..80a7e196 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -73,10 +73,11 @@ jobs: - name: Install GitHub CLI run: sudo apt update && sudo apt install -y gh - - name: Publish Bot Debug + - name: Restore, Build And Publish run: | - dotnet restore --configfile ./Nuget.config --force --no-cache --ucr - dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Debug --ucr + dotnet restore /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr + dotnet build /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Debug --no-incremental --no-restore --no-self-contained --ucr + dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot.Bot/AzzyBot.Bot.csproj -c Debug --no-build --no-restore --no-self-contained --ucr #- name: Download and extract Lavalink # run: | diff --git a/dev.Dockerfile b/dev.Dockerfile index 899ec4e4..f79a86ed 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -9,7 +9,8 @@ COPY ./ ./ ARG CONFIG COPY ./Nuget.config ./Nuget.config RUN dotnet restore ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr -RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --no-restore -c $CONFIG -o out --ucr +RUN dotnet build ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-incremental --no-restore --no-self-contained --ucr +RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-build --no-restore --no-self-contained -o out --ucr # RUNNER IMAGE FROM mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim AS runner diff --git a/dev.alpine.Dockerfile b/dev.alpine.Dockerfile index b0c49649..52c95023 100644 --- a/dev.alpine.Dockerfile +++ b/dev.alpine.Dockerfile @@ -9,7 +9,8 @@ COPY ./ ./ ARG CONFIG COPY ./Nuget.config ./Nuget.config RUN dotnet restore ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr -RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --no-restore -c $CONFIG -o out --ucr +RUN dotnet build ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-incremental --no-restore --no-self-contained --ucr +RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-build --no-restore --no-self-contained -o out --ucr # RUNNER IMAGE FROM mcr.microsoft.com/dotnet/runtime:9.0-alpine AS runner diff --git a/release.Dockerfile b/release.Dockerfile index 5aaee74d..6ab42d69 100644 --- a/release.Dockerfile +++ b/release.Dockerfile @@ -9,7 +9,8 @@ COPY ./ ./ ARG CONFIG COPY ./Nuget.config ./Nuget.config RUN dotnet restore ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr -RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --no-restore -c $CONFIG -o out --ucr +RUN dotnet build ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-incremental --no-restore --no-self-contained --ucr +RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-build --no-restore --no-self-contained -o out --ucr # RUNNER IMAGE FROM mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim AS runner diff --git a/release.alpine.Dockerfile b/release.alpine.Dockerfile index a8f58959..b86b590b 100644 --- a/release.alpine.Dockerfile +++ b/release.alpine.Dockerfile @@ -9,7 +9,8 @@ COPY ./ ./ ARG CONFIG COPY ./Nuget.config ./Nuget.config RUN dotnet restore ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --configfile ./Nuget.config --force --no-cache --ucr -RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj --no-restore -c $CONFIG -o out --ucr +RUN dotnet build ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-incremental --no-restore --no-self-contained --ucr +RUN dotnet publish ./src/AzzyBot.Bot/AzzyBot.Bot.csproj -c $CONFIG --no-build --no-restore --no-self-contained -o out --ucr # RUNNER IMAGE FROM mcr.microsoft.com/dotnet/runtime:9.0-alpine AS runner