Telegram Bot Update #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Telegram Bot Update | |
on: | |
schedule: | |
- cron: '2 */6 * * *' # Run the script every day at midnight (UTC) | |
workflow_dispatch: | |
jobs: | |
fetch_and_send: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
echo "Installing dependencies..." | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
echo "Dependencies installed successfully." | |
- name: Print secret value | |
run: echo "${{ secrets.TOKEN }}" | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
- name: Run script | |
run: python bot/data.py | |
env: | |
TOKEN: ${{ secrets.TOKEN }} |