diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2cbfb07 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +README.md +CONTRIBUTING.md +**/__pycache__/ +.git/ +token diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml new file mode 100644 index 0000000..6f68887 --- /dev/null +++ b/.github/workflows/image-build.yaml @@ -0,0 +1,12 @@ +name: "Dev Image Build" +run-name: ${{ github.actor }} Dev Image Build +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo "Job triggered by ${{ github.event_name }}." + - uses: actions/checkout@v3 + - run: docker --version + - run: docker build -t morningbot-dev . + - run: docker image ls | grep morningbot-dev diff --git a/.github/workflows/json-lint.yaml b/.github/workflows/json-lint.yaml index 6b1635a..5feac5b 100644 --- a/.github/workflows/json-lint.yaml +++ b/.github/workflows/json-lint.yaml @@ -1,8 +1,8 @@ -name: Json-Validate -run-name: ${{ github.actor }} PR being linted for code cleanliness +name: Json Validate +run-name: ${{ github.actor }} Validating JSON in config files on: [pull_request] jobs: - Lint: + validate: runs-on: ubuntu-latest steps: - run: echo "Job triggered by ${{ github.event_name }} event." diff --git a/.github/workflows/python-lint.yaml b/.github/workflows/python-lint.yaml index 4204f6e..37e646e 100644 --- a/.github/workflows/python-lint.yaml +++ b/.github/workflows/python-lint.yaml @@ -1,8 +1,8 @@ -name: Test-Lint +name: Python Lint run-name: ${{ github.actor }} PR being linted for code cleanliness on: [pull_request] jobs: - Lint: + lint: runs-on: ubuntu-latest steps: - run: echo "Job triggered by ${{ github.event_name }} event." diff --git a/Dockerfile b/Dockerfile index 11923c6..ade8098 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ -FROM python:latest - -FROM gorialis/discord.py +FROM python:3.11-slim RUN mkdir -p /usr/src/MorningBot - WORKDIR /usr/src/MorningBot COPY . . +RUN pip install -r requirements.txt -CMD ["python3", "main.py"] \ No newline at end of file +CMD ["python3", "."] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ecc1804 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + morningbot: + image: morningbot:latest + volumes: + - ./token:/usr/src/MorningBot/token