-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 1.08 KB
/
twitter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: The Foxy Does What The Foxy Wants
on:
schedule:
- cron: "0 7 * * *"
jobs:
build:
name: Twitter Data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- run: python data/scripts/twitter.py
env:
TWITTER_ACCESS_KEY: ${{ secrets.TWITTER_ACCESS_KEY }}
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Api Updater"
git add .
git diff-index --quiet HEAD || git commit -m "Twitter Data Updated 🦊" -a
git push