Run main.py everyday #994
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 main.py everyday | |
on: | |
schedule: | |
- cron: "50 11 * * *" #Run everyday at 11:50AM UTC (8:50AM BRT) | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Update pip | |
run: | | |
python3 -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi | |
- name: Run main script | |
env: | |
BEARER_TOKEN: ${{secrets.BEARER_TOKEN}} | |
CONSUMER_KEY: ${{secrets.CONSUMER_KEY}} | |
CONSUMER_SECRET: ${{secrets.CONSUMER_SECRET}} | |
TOKEN: ${{secrets.TOKEN}} | |
TOKEN_SECRET: ${{secrets.TOKEN_SECRET}} | |
run: | | |
python3 main.py |