From 59de0b14554e53dbbb46e2eed88c49407ad2b686 Mon Sep 17 00:00:00 2001 From: Panchajanya1999 Date: Sat, 16 Mar 2024 00:19:16 +0530 Subject: [PATCH] github/docker-image: Setup TG API Signed-off-by: Panchajanya1999 --- .github/workflows/docker-image.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 50aeadf..2b73597 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,6 +8,10 @@ on: schedule: - cron: '0 0 * * *' +env: + BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + CHAT_ID: ${{ secrets.CHAT }} + jobs: build: runs-on: ubuntu-latest @@ -21,6 +25,10 @@ jobs: username: panchajanya1999 password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Announce on TG + run: | + curl -s -X POST https://api.telegram.org/bot${BOT_TOKEN}/sendMessage -d chat_id=${CHAT_ID} -d text="Docker image build started" + - name: Build and push Docker image run: | docker build -f Dockerfile . -t panchajanya1999/archlinux:latest