Run Weekly Updates Bot #29
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: Run Weekly Updates Bot | |
on: | |
schedule: | |
- cron: '0 1 * * 1' # At 1:00 AM on Monday | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests openai slack_sdk certifi | |
- name: Run the script | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
ASSISTANT_ID: ${{ secrets.ASSISTANT_ID }} | |
run: | | |
python weekly-updates-bot.py |