run pre-commit on garfbot repo
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 19s

This commit is contained in:
2025-08-15 15:50:40 -05:00
parent c5ccb79f33
commit 9b519c1fa9
8 changed files with 24 additions and 14 deletions

View File

@@ -13,11 +13,11 @@ jobs:
- name: Pull GarfBot and re-deploy - name: Pull GarfBot and re-deploy
run: | run: |
cd /workspace/crate/garfbot/garfbot cd /workspace/crate/garfbot/garfbot
git pull origin main git pull origin main
CHANGED=$(git diff --name-only HEAD~1 HEAD) 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 echo "$CHANGED" | grep -qE "(Dockerfile|requirements\.txt|docker-compose\.yml|\.gitea/workflows/deploy\.yaml)"; then
if [ "$(docker compose ps -q)" ]; then if [ "$(docker compose ps -q)" ]; then
docker compose down docker compose down

2
.gitignore vendored
View File

@@ -8,4 +8,4 @@ garfpy/__pycache__/
meows.py meows.py
meow_counts.json meow_counts.json
user_stats.json user_stats.json
responses.json responses.json

10
.pre-commit-config.yaml Normal file
View File

@@ -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

View File

@@ -26,4 +26,4 @@ RUN pip3 install --no-cache-dir \
pillow \ pillow \
qrcode qrcode
CMD [ "python", "garfmain.py" ] CMD [ "python", "garfmain.py" ]

View File

@@ -97,4 +97,4 @@ And finally:
$ sudo systemctl daemon-reload $ sudo systemctl daemon-reload
$ sudo systemctl enable garfbot $ sudo systemctl enable garfbot
$ sudo systemctl start garfbot $ sudo systemctl start garfbot
``` ```

View File

@@ -5,9 +5,9 @@ provider "docker" {
resource "docker_container" "garfbot" { resource "docker_container" "garfbot" {
name = "garfbot" name = "garfbot"
image = "garfbot" image = "garfbot"
restart = "always" restart = "always"
volumes { volumes {
container_path = "/usr/src/app" container_path = "/usr/src/app"
host_path = "/home/crate/garfbot" host_path = "/home/crate/garfbot"
@@ -17,9 +17,9 @@ resource "docker_container" "garfbot" {
resource "docker_container" "jonbot" { resource "docker_container" "jonbot" {
name = "jonbot" name = "jonbot"
image = "jonbot" image = "jonbot"
restart = "always" restart = "always"
volumes { volumes {
container_path = "/usr/src/app" container_path = "/usr/src/app"
host_path = "/home/crate/garfbot" host_path = "/home/crate/garfbot"
@@ -29,9 +29,9 @@ resource "docker_container" "jonbot" {
resource "docker_container" "moneybot" { resource "docker_container" "moneybot" {
name = "moneybot" name = "moneybot"
image = "moneybot" image = "moneybot"
restart = "always" restart = "always"
volumes { volumes {
container_path = "/usr/src/app" container_path = "/usr/src/app"
host_path = "/home/crate/garfbot" host_path = "/home/crate/garfbot"

View File

@@ -9,4 +9,4 @@ from .respond import GarfbotRespond
from .aod import aod_message from .aod import aod_message
from .qr import generate_qr from .qr import generate_qr
from .iputils import IPUtils from .iputils import IPUtils
from .weather import WeatherAPI from .weather import WeatherAPI

View File

@@ -4,4 +4,4 @@ aiohttp
requests requests
wikipedia wikipedia
pillow pillow
qrcode qrcode