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
|
- 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
2
.gitignore
vendored
@@ -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
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 \
|
pillow \
|
||||||
qrcode
|
qrcode
|
||||||
|
|
||||||
CMD [ "python", "garfmain.py" ]
|
CMD [ "python", "garfmain.py" ]
|
||||||
|
@@ -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
|
||||||
```
|
```
|
||||||
|
12
garfbot.tf
12
garfbot.tf
@@ -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"
|
||||||
|
@@ -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
|
||||||
|
@@ -4,4 +4,4 @@ aiohttp
|
|||||||
requests
|
requests
|
||||||
wikipedia
|
wikipedia
|
||||||
pillow
|
pillow
|
||||||
qrcode
|
qrcode
|
||||||
|
Reference in New Issue
Block a user