telegram joke report #249
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: telegram joke report | |
on: | |
schedule: | |
- cron: "0 15 * * *" | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: ./.github/workflows/report_jokes | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.9 | |
- name: Fetch and render joke | |
run: | | |
pip install urllib3 && \ | |
python main.py > report_joke && \ | |
cat report_joke | |
- name: send joke report to osscameroon group | |
uses: appleboy/[email protected] | |
with: | |
to: ${{ secrets.TELEGRAM_OSSCAMEROON_GROUP_ID }} | |
token: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
message_file: ./.github/workflows/report_jokes/report_joke |