Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): add more platforms to build #15

Merged
merged 5 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions utils/skyblock_guild.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down