Twitter Bot #30309
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: Twitter Bot | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '00 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python version to 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: INSTALLING DEPENDENCIES FIRST☝ | |
run: | | |
pip install tweepy | |
pip install beautifulsoup4 | |
pip install html5lib | |
pip install pytz | |
pip install requests | |
- name: RUNNING main.py 🐍 | |
env: | |
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }} | |
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }} | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }} | |
YAHOO_URL: ${{ secrets.YAHOO_URL }} | |
EMAIL: ${{ secrets.EMAIL }} | |
run: | | |
python main.py | |
message=$(date +'%Y-%m-%d-%H:%M:%S') | |
echo $message | |
git config --global user.email "$EMAIL" | |
git config --global user.name "Clima En Reynosa" | |
git add . | |
git commit -m "$message" | |
git push |