Compare commits
2 Commits
5776c00dce
...
94dd530823
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94dd530823 | ||
|
|
e00aa69369 |
24
.gitea/scripts/hygiene-check.sh
Normal file
24
.gitea/scripts/hygiene-check.sh
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
max_bytes=$((50 * 1024 * 1024))
|
||||||
|
failed=0
|
||||||
|
|
||||||
|
while IFS= read -r -d '' file; do
|
||||||
|
case "$file" in
|
||||||
|
.env|*/.env|*.DS_Store|*/node_modules/*|*.tmp|*.temp|*.bak|*.orig|*.rej|*.zip|*.tar|*.tar.gz|*.tgz|*.rar|*.7z)
|
||||||
|
echo "Forbidden tracked file: $file" >&2
|
||||||
|
failed=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
size=$(wc -c < "$file")
|
||||||
|
if [ "$size" -gt "$max_bytes" ]; then
|
||||||
|
echo "Tracked file is larger than 50 MiB: $file ($size bytes)" >&2
|
||||||
|
failed=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < <(git ls-files -z)
|
||||||
|
|
||||||
|
exit "$failed"
|
||||||
@@ -5,8 +5,15 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
hygiene:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: bash .gitea/scripts/hygiene-check.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: hygiene
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ metadata:
|
|||||||
name: learning-config
|
name: learning-config
|
||||||
namespace: learning
|
namespace: learning
|
||||||
data:
|
data:
|
||||||
DATABASE_URL: "postgres://learning:learning@postgres.learning.svc.cluster.local:5432/learning?sslmode=disable"
|
|
||||||
SERVER_PORT: "3001"
|
SERVER_PORT: "3001"
|
||||||
# PORTAL_URL — для in-app уведомлений HR'у когда кандидат проходит тест,
|
# PORTAL_URL — для in-app уведомлений HR'у когда кандидат проходит тест,
|
||||||
# сотруднику когда ему назначили курс. Пустой = notify-вызовы no-op'ятся.
|
# сотруднику когда ему назначили курс. Пустой = notify-вызовы no-op'ятся.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ metadata:
|
|||||||
namespace: learning
|
namespace: learning
|
||||||
type: Opaque
|
type: Opaque
|
||||||
stringData:
|
stringData:
|
||||||
|
DATABASE_URL: "postgres://learning:learning@postgres.learning.svc.cluster.local:5432/learning?sslmode=disable"
|
||||||
PORTAL_INTERNAL_API_KEY: "36fe89ed40c01fdc54d3cf4e3fcacc8751dc456a4a1acd394e9fed48257c5734"
|
PORTAL_INTERNAL_API_KEY: "36fe89ed40c01fdc54d3cf4e3fcacc8751dc456a4a1acd394e9fed48257c5734"
|
||||||
INTERNAL_API_KEY: "36fe89ed40c01fdc54d3cf4e3fcacc8751dc456a4a1acd394e9fed48257c5734"
|
INTERNAL_API_KEY: "36fe89ed40c01fdc54d3cf4e3fcacc8751dc456a4a1acd394e9fed48257c5734"
|
||||||
MINIO_ACCESS_KEY: "learning-svc"
|
MINIO_ACCESS_KEY: "learning-svc"
|
||||||
|
|||||||
Reference in New Issue
Block a user