Skip to content

Fetch Mastodon Statuses #16756

Fetch Mastodon Statuses

Fetch Mastodon Statuses #16756

Workflow file for this run

name: Fetch Mastodon Statuses
on:
push:
branches:
- main
schedule:
- cron: '*/5 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: pip install requests
- name: Fetch Mastodon statuses and generate memos
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_USERNAME: ${{ secrets.MASTODON_USERNAME }}
run: |
python fetch_mastodon_status.py
python generate_memos.py
- name: Commit and push status.json and memos.json
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add status.json memos.json last_fetched_id.txt img/
git commit -m 'Update status.json, memos.json, and images'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}