From 401a556c54fd68fb0ec86bd713e244421c2a5386 Mon Sep 17 00:00:00 2001 From: Elena Ponomareva Date: Mon, 27 Apr 2026 23:27:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20ci.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 50 +++++++++++++++------------------------ 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4a3f37..ffe61a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,31 +1,19 @@ -name: CI -run-name: "${{ github.ref_name }} - ${{ github.event_name }} by @${{ github.actor }}" - -on: - push: - branches: [develop, main] - tags: ["v*"] - pull_request: - branches: [develop, main] - -concurrency: - group: ci-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build & Test - uses: ./.github/workflows/build.yaml - permissions: - contents: read - - docker: - name: Docker - needs: build - uses: ./.github/workflows/docker.yaml - permissions: - contents: read - packages: write - with: - push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} - secrets: inherit +- name: Send Telegram notification + env: + TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + VERSION: ${{ inputs.version }} + REPO: ${{ github.repository }} + DIGEST: ${{ inputs.image-digest }} + run: | + RELEASE_URL="https://github.com/${REPO}/releases/tag/${VERSION}" + MSG="*${REPO}* - released *${VERSION}*" + MSG="${MSG}%0A🔗 [Release notes](${RELEASE_URL})" + if [ -n "${DIGEST}" ]; then + MSG="${MSG}%0AImage: \`ghcr.io/${REPO}@${DIGEST}\`" + fi + curl -sf -X POST \ + "https://api.telegram.org/bot${TOKEN}/sendMessage" \ + -d "chat_id=${CHAT_ID}" \ + -d "parse_mode=Markdown" \ + -d "text=${MSG}"