Telegram Bot Setting - CausalInferenceLab/Lang2SQL GitHub Wiki

GitHub Action Secrets ํ‚ค ์„ค์ • ๋ฐฉ๋ฒ•

  • Telegram Bot ์„ค์ •์„ ์œ„ํ•ด์„œ๋Š” Secret ์„ค์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. image

GitHub Repository์—์„œ Secrets ์„ค์ •

  • GitHub Repository๋กœ ์ด๋™
  • Settings ํƒญ ํด๋ฆญ
  • ์™ผ์ชฝ ์‚ฌ์ด๋“œ๋ฐ”์—์„œ "Secrets and variables" โ†’ "Actions" ์„ ํƒ
  • "New repository secret" ๋ฒ„ํŠผ ํด๋ฆญ
  • ์•„๋ž˜ ๊ฐ’์„ ์ž…๋ ฅ
Name: TELEGRAM_BOT_TOKEN
Secret: your_telegram_bot_token (BotFather์—๊ฒŒ ๋ฐ›์€ ํ† ํฐ)
  • Save ๋ฒ„ํŠผ ํด๋ฆญ
  • ๋‹ค์‹œ "New repository secret" ๋ฒ„ํŠผ์„ ํด๋ฆญ
Name: TELEGRAM_CHAT_ID
Secret: your_chat_id (Telegram getUpdates API๋กœ ๊ฐ€์ ธ์˜จ ๊ฐ’)
  • Save ๋ฒ„ํŠผ ํด๋ฆญ

์ €์žฅํ•œ Secrets ์‚ฌ์šฉํ•˜๊ธฐ

  • GitHub Actions์—์„œ ์ •์˜ํ•œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
env:
  TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
  TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

Secrets๋Š” ๋ณด์•ˆ์ƒ ์กฐํšŒํ•  ์ˆ˜ ์—†์Œ. ์ˆ˜์ •ํ•˜๋ ค๋ฉด ๊ธฐ์กด ๊ฐ’์„ ์ง€์šฐ๊ณ  ๋‹ค์‹œ ๋“ฑ๋กํ•ด์•ผ ํ•จ.

  • Settings > Secrets and variables > Actions์—์„œ ์ˆ˜์ • ๊ฐ€๋Šฅ.

Telegram Bot ์ ‘๊ทผํ•˜๊ธฐ

  • ๋‹จํ†ก๋ฐฉ ๊ณต์œ