run pre-commit on garfbot repo
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 19s
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 19s
This commit is contained in:
@@ -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
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,4 +8,4 @@ garfpy/__pycache__/
|
||||
meows.py
|
||||
meow_counts.json
|
||||
user_stats.json
|
||||
responses.json
|
||||
responses.json
|
||||
|
10
.pre-commit-config.yaml
Normal file
10
.pre-commit-config.yaml
Normal 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
|
@@ -26,4 +26,4 @@ RUN pip3 install --no-cache-dir \
|
||||
pillow \
|
||||
qrcode
|
||||
|
||||
CMD [ "python", "garfmain.py" ]
|
||||
CMD [ "python", "garfmain.py" ]
|
||||
|
@@ -97,4 +97,4 @@ And finally:
|
||||
$ sudo systemctl daemon-reload
|
||||
$ sudo systemctl enable garfbot
|
||||
$ sudo systemctl start garfbot
|
||||
```
|
||||
```
|
||||
|
12
garfbot.tf
12
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"
|
||||
|
@@ -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
|
||||
from .weather import WeatherAPI
|
||||
|
@@ -4,4 +4,4 @@ aiohttp
|
||||
requests
|
||||
wikipedia
|
||||
pillow
|
||||
qrcode
|
||||
qrcode
|
||||
|
Reference in New Issue
Block a user