Notify Ads Bot #432
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: Notify Ads Bot | |
on: | |
schedule: | |
- cron: "0 */12 * * *" | |
jobs: | |
notify_ads: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests apscheduler python-telegram-bot | |
- name: Run the script | |
env: | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
CHAT_ID: ${{ secrets.CHAT_ID }} | |
API_URL: ${{ secrets.API_URL }} | |
run: | | |
python -u notify_ads.py | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "crongenerated" || exit 0 | |
git push | |