From fa0d7ef875c8e88ec72c6fd7bc655b71be214c70 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:36:47 -0500 Subject: [PATCH 1/3] Fix Dockerfile python install --- DevryBot/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DevryBot/Dockerfile b/DevryBot/Dockerfile index d1f1d49..102cea0 100644 --- a/DevryBot/Dockerfile +++ b/DevryBot/Dockerfile @@ -8,8 +8,7 @@ RUN chmod --recursive +x /app/Data # Python Snippet Scanner Requires the following items to be installed RUN apt-get update -RUN apt-get install -y python3.7 -RUN apt install -y python3-pip +RUN apt-get install -y python3 python3-pip RUN pip3 install prospector[with_everything] FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build From 4280d0b0880999dec3ccd86b31e0b738213727fc Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:45:56 -0500 Subject: [PATCH 2/3] Update workflow to use newer .NET SDK --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6bf3d73..507fb8b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.102 + dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore DevryBot - name: Build From 0c4afb2929a21247d00a29e7578335539f93793d Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:51:53 -0500 Subject: [PATCH 3/3] Switch image publishing to GHCR --- .github/workflows/dotnet.yml | 13 ++++++++----- DevryBot/Install.sh | 4 ++-- DevryBot/docker-compose.yml | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 507fb8b..3f1cb0d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,13 +21,16 @@ jobs: run: dotnet restore DevryBot - name: Build run: dotnet build --no-restore --configuration Release --no-restore - - name: Login to Dockerhub + - name: Login to GHCR uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build Docker Image - run: export TOKEN=${{ secrets.DISCORD_TOKEN }} && docker build --build-arg TOKEN -f DevryBot/Dockerfile -t mercenary9312/unofficial-devry-service-bot . + run: | + export TOKEN=${{ secrets.DISCORD_TOKEN }} + docker build --build-arg TOKEN -f DevryBot/Dockerfile -t ghcr.io/${{ github.repository }}:latest . - name: Push Docker Image - run: docker push mercenary9312/unofficial-devry-service-bot + run: docker push ghcr.io/${{ github.repository }}:latest diff --git a/DevryBot/Install.sh b/DevryBot/Install.sh index 91da414..f684a35 100644 --- a/DevryBot/Install.sh +++ b/DevryBot/Install.sh @@ -15,13 +15,13 @@ docker stop $DEVRY_CONTAINER_ID # G E T L A T E S T D O C K E R I M A G E # ############################################################ echo "Getting the latest bot image..." -docker pull mercenary9312/unofficial-devry-service-bot +docker pull ghcr.io/unofficial-devry-it/devrycommunity:latest ############################################################ # S T A R T T E M P O R A R Y I M A G E ############################################################ echo "Starting temporary container..." -docker run --rm -d --name devry-service-bot mercenary9312/unofficial-devry-service-bot:latest +docker run --rm -d --name devry-service-bot ghcr.io/unofficial-devry-it/devrycommunity:latest ############################################################ # C R E A T I N G T E M P D I R diff --git a/DevryBot/docker-compose.yml b/DevryBot/docker-compose.yml index e0db42f..5349c0f 100644 --- a/DevryBot/docker-compose.yml +++ b/DevryBot/docker-compose.yml @@ -10,7 +10,7 @@ services: devry-services: environment: TZ: "America/New_York" - image: "mercenary9312/unofficial-devry-service-bot" + image: "ghcr.io/unofficial-devry-it/devrycommunity:latest" restart: "always" volumes: - devrydata:/app/Data:rw