Post book tweet #1258
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: Post book tweet | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * *" | |
- cron: "0 19 * * *" | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Checkout repository content | |
uses: actions/checkout@master | |
- name: Install requirements.txt | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Set enviromental secrets and execute twitter_bot.py | |
env: | |
PG_TWITTER_ACCESS_TOKEN: ${{ secrets.PG_TWITTER_ACCESS_TOKEN }} | |
PG_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.PG_TWITTER_ACCESS_TOKEN_SECRET }} | |
PG_TWITTER_BEARER_TOKEN: ${{ secrets.PG_TWITTER_BEARER_TOKEN }} | |
PG_TWITTER_CONSUMER_KEY: ${{ secrets.PG_TWITTER_CONSUMER_KEY }} | |
PG_TWITTER_CONSUMER_SECRET: ${{ secrets.PG_TWITTER_CONSUMER_SECRET }} | |
run: | | |
python pg_scifi_twitter_bot/twitter_bot.py | |
- name: update repo | |
run: | | |
git config user.email ${{ secrets.EMAIL }} | |
git config user.name "Ben" | |
git config user.username ben-n93 | |
git config user.password ${{ secrets.PERSONAL_ACCESS_TOKEN}} | |
git add --all | |
git commit -m "update" | |
git push |