Telegram Bot Setting - CausalInferenceLab/Lang2SQL GitHub Wiki
GitHub Action Secrets ํค ์ค์ ๋ฐฉ๋ฒ
- Telegram Bot ์ค์ ์ ์ํด์๋ Secret ์ค์ ์ด ํ์ํฉ๋๋ค.
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 ์ ๊ทผํ๊ธฐ
- ๋จํก๋ฐฉ ๊ณต์