diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d8678b3..e6531c2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -3,28 +3,27 @@ name: ci on: push: branches: - - 'main' + - main jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub + + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + + - name: Build and push uses: docker/build-push-action@v5 with: push: true tags: gylfirst/chouettebot:latest,gylfirst/chouettebot:v0.0.${{ github.run_number }} - platforms: linux/amd64, linux/arm/v6 + platforms: linux/amd64, linux/arm/v6, linux/arm/v7 diff --git a/Dockerfile b/Dockerfile index 1110005..099263c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ # Dockerfile for the python discord bot -FROM python:3.12-alpine +FROM python:3.11-alpine WORKDIR /usr/src/chouettebot COPY . . -RUN pip --no-cache-dir install -r requirements.txt +RUN echo -e "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /usr/local/pip.conf && \ + pip --no-cache-dir install -r requirements.txt EXPOSE 8080 CMD ["python3", "main.py"] diff --git a/utils/skyblock_guild.py b/utils/skyblock_guild.py index a47b299..4502fe4 100644 --- a/utils/skyblock_guild.py +++ b/utils/skyblock_guild.py @@ -1,8 +1,8 @@ import aiohttp -from dotenv import dotenv_values +from os import getenv api_hypixel = "https://api.hypixel.net/" -token_hypixel = dotenv_values()["HYPIXEL_KEY"] +token_hypixel = getenv("HYPIXEL_KEY") async def fetch(session, url, params=None):