dev #9

Merged
avm merged 100 commits from dev into main 2026-03-17 16:06:44 +03:00
2 changed files with 36 additions and 0 deletions
Showing only changes of commit 76d9c1d312 - Show all commits

View File

@@ -140,3 +140,35 @@ jobs:
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \ curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
-d "chat_id=${TG_CHANNEL}" \ -d "chat_id=${TG_CHANNEL}" \
--data-urlencode "text=${MSG}" --data-urlencode "text=${MSG}"
notify_success:
name: Telegram Notify Success
runs-on: ubuntu-latest
needs: [lint, test]
if: |
always() &&
needs.lint.result == 'success' &&
needs.test.result == 'success'
env:
TG_BOT_KEY: ${{ secrets.TG_BOT_KEY }}
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
steps:
- name: Telegram notify (lint+test success)
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
set -euo pipefail
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
echo "TG_BOT_KEY or TG_CHANNEL is not set; skip telegram notification"
exit 0
fi
MSG="✅ [mostovik-backend] lint + tests passed
branch=${GITHUB_REF_NAME}
sha=${GITHUB_SHA}
actor=${GITHUB_ACTOR}
commit=${COMMIT_MESSAGE:-n/a}"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
-d "chat_id=${TG_CHANNEL}" \
--data-urlencode "text=${MSG}"

View File

@@ -2,6 +2,10 @@
set -eu set -eu
export DJANGO_SETTINGS_MODULE="${DJANGO_SETTINGS_MODULE:-settings.production}" export DJANGO_SETTINGS_MODULE="${DJANGO_SETTINGS_MODULE:-settings.production}"
export STARTUP_COMPONENT="${STARTUP_COMPONENT:-web}"
/app/docker/scripts/check-deps.sh
python src/manage.py migrate --noinput
exec gunicorn core.wsgi:application \ exec gunicorn core.wsgi:application \
--bind "0.0.0.0:${PORT:-8000}" \ --bind "0.0.0.0:${PORT:-8000}" \