diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6bf3d73..3f1cb0d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,18 +16,21 @@ 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 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/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 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