From e9a5168b1a2e964c103c7f608bb4c4e7998fc316 Mon Sep 17 00:00:00 2001 From: Meveliq Date: Sat, 19 Sep 2026 20:31:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.gitea/workflows/monitor.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/monitor.yaml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/monitor.yaml diff --git a/.gitea/workflows/monitor.yaml b/.gitea/workflows/monitor.yaml new file mode 100644 index 0000000..8213c34 --- /dev/null +++ b/.gitea/workflows/monitor.yaml @@ -0,0 +1,39 @@ +name: VK Online Monitor + +on: + # Ручной запуск через веб-интерфейс + workflow_dispatch: + + # Или запуск по расписанию (например, каждые 30 минут) + # Раскомментируйте, если нужно + # schedule: + # - cron: '*/30 * * * *' + +jobs: + run-monitor: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'pip' # Кэширование pip-зависимостей + + - name: Install dependencies + run: | + python -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install vk_api + + - name: Run monitor (timeout 30 min) + run: | + source .venv/bin/activate + timeout 30m python monitor.py || true + env: + # Токен передаём через секреты Gitea + VK_TOKEN: ${{ secrets.VK_TOKEN }} \ No newline at end of file