Skip to content

Toot

Toot #2451

Workflow file for this run

name: Toot
on:
workflow_dispatch:
schedule:
- cron: '0 */8 * * *'
jobs:
tweet:
name: Toot
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install scraper
run: pip install jupyterlab requests python-twitter pillow fastprogress tqdm 'mastodon.py' requests matplotlib
- id: execute
name: Execute Jupyter notebook
run: jupyter execute tweet.ipynb
shell: bash
env:
MASTODON_CLIENT_KEY: ${{ secrets.MASTODON_CLIENT_KEY }}
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
- run: date > datestamp.txt
- id: commit
name: Commit
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git config pull.rebase false
git pull origin $GITHUB_REF
git add datestamp.txt
git commit -m "Ran a scrape" --author="palewire <[email protected]>" && git push || true
shell: bash