diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6a91706..d0efbe6 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -13,11 +13,11 @@ jobs: - name: Pull GarfBot and re-deploy run: | cd /workspace/crate/garfbot/garfbot - + git pull origin main - + CHANGED=$(git diff --name-only HEAD~1 HEAD) - + if echo "$CHANGED" | grep -qE "(Dockerfile|requirements\.txt|docker-compose\.yml|\.gitea/workflows/deploy\.yaml)"; then if [ "$(docker compose ps -q)" ]; then docker compose down diff --git a/.gitignore b/.gitignore index 0b96242..fb3ec2b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ garfpy/__pycache__/ meows.py meow_counts.json user_stats.json -responses.json \ No newline at end of file +responses.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fd16ba2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files diff --git a/Dockerfile b/Dockerfile index e76b8cf..71f22d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ RUN pip3 install --no-cache-dir \ pillow \ qrcode -CMD [ "python", "garfmain.py" ] \ No newline at end of file +CMD [ "python", "garfmain.py" ] diff --git a/README.md b/README.md index d750de1..c3463f6 100644 --- a/README.md +++ b/README.md @@ -97,4 +97,4 @@ And finally: $ sudo systemctl daemon-reload $ sudo systemctl enable garfbot $ sudo systemctl start garfbot -``` \ No newline at end of file +``` diff --git a/garfbot.tf b/garfbot.tf index 7b95b3e..6b08c46 100644 --- a/garfbot.tf +++ b/garfbot.tf @@ -5,9 +5,9 @@ provider "docker" { resource "docker_container" "garfbot" { name = "garfbot" image = "garfbot" - + restart = "always" - + volumes { container_path = "/usr/src/app" host_path = "/home/crate/garfbot" @@ -17,9 +17,9 @@ resource "docker_container" "garfbot" { resource "docker_container" "jonbot" { name = "jonbot" image = "jonbot" - + restart = "always" - + volumes { container_path = "/usr/src/app" host_path = "/home/crate/garfbot" @@ -29,9 +29,9 @@ resource "docker_container" "jonbot" { resource "docker_container" "moneybot" { name = "moneybot" image = "moneybot" - + restart = "always" - + volumes { container_path = "/usr/src/app" host_path = "/home/crate/garfbot" diff --git a/garfpy/__init__.py b/garfpy/__init__.py index 3fe66a0..3282bdb 100644 --- a/garfpy/__init__.py +++ b/garfpy/__init__.py @@ -9,4 +9,4 @@ from .respond import GarfbotRespond from .aod import aod_message from .qr import generate_qr from .iputils import IPUtils -from .weather import WeatherAPI \ No newline at end of file +from .weather import WeatherAPI diff --git a/requirements.txt b/requirements.txt index 4f733b9..d0373dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ aiohttp requests wikipedia pillow -qrcode \ No newline at end of file +qrcode