Daily summary #1103
This file contains 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: Daily summary | |
# Requires these repository secrets: | |
# TELEGRAM_TOKEN - a token for the Telegram bot API | |
# TELEGRAM_DEBUG_CHAT_ID - the ID of the private Telegram channel | |
# TELEGRAM_PUBLIC_CHAT_ID - the ID of the public Telegram channel | |
on: | |
schedule: | |
- cron: '0 6 * * *' # Every day at 06:00 UTC, which is either 07:00 (CET) or 08:00 (CEST) in Vaterstetten | |
workflow_dispatch: | |
jobs: | |
poll-data: | |
environment: vaterstetten-in-zahlen.de | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install APT requirements | |
run: sudo apt update && sudo apt install -y libkrb5-dev | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install pipenv | |
run: pip install --ignore-installed pipenv==2023.2.18 | |
- name: Install python packages | |
run: pipenv sync | |
- name: Run python script | |
run: pipenv run python tools/dailySummary.py $TELEGRAM_TOKEN $TELEGRAM_DEBUG_CHAT_ID $TELEGRAM_PUBLIC_CHAT_ID | |
env: | |
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | |
TELEGRAM_DEBUG_CHAT_ID: ${{ secrets.TELEGRAM_DEBUG_CHAT_ID }} | |
TELEGRAM_PUBLIC_CHAT_ID: ${{ secrets.TELEGRAM_PUBLIC_CHAT_ID }} |