From 90d32e29f4b2a3f1ead887d6abaf133f78bdce71 Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Sun, 31 Aug 2025 18:14:50 +0200 Subject: [PATCH] add githooks and setup.sh --- .github/workflows/ci.yml | 3 --- githooks/pre-commit | 12 ++++++++++++ pipeline/create-git-hash-html.sh | 2 -- setup.sh | 3 +++ 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100755 githooks/pre-commit create mode 100755 setup.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2991939..284c28f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,6 @@ jobs: run: docker build -t git.rivercry.com/wg/monitor-im-flur . - name: Push Docker image run: docker push git.rivercry.com/wg/monitor-im-flur - - name: Deploy via SSH uses: appleboy/ssh-action@v0.1.10 with: @@ -70,8 +69,6 @@ jobs: password: ${{ secrets.GARRISON_DOCKER_PASSWORD }} script: | cd monitor-im-flur - echo "Deploying Docker container..." - $HYPRLAND_INSTANCE_SIGNATURE hyprctl dispatch exec 'pkill firefox' hyprctl dispatch exec 'firefox -kiosk localhost:9123' git clean -dfx diff --git a/githooks/pre-commit b/githooks/pre-commit new file mode 100755 index 0000000..3849097 --- /dev/null +++ b/githooks/pre-commit @@ -0,0 +1,12 @@ +#!/bin/sh + +echo "Running pre-commit hooks..." + +biome check --write +biome lint --write + +if git diff --quiet; then + exit 0 +else + git add -u +fi diff --git a/pipeline/create-git-hash-html.sh b/pipeline/create-git-hash-html.sh index 7af279f..3eb1d94 100755 --- a/pipeline/create-git-hash-html.sh +++ b/pipeline/create-git-hash-html.sh @@ -1,7 +1,5 @@ #!/bin/sh - -# create git-hash.html echo " diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..0ba2c34 --- /dev/null +++ b/setup.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +git config --local core.hooksPath githooks