Skip to content

Twitter Poster

Twitter Poster #445

Workflow file for this run

name: Twitter Poster
on:
schedule:
- cron: '0 */12 * * *' # every 12 hours
workflow_dispatch: # lets you trigger manually too
jobs:
post:
runs-on: ubuntu-latest
permissions:
contents: write # needed for pushing changes
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests beautifulsoup4 pillow
- name: Run poster script
env:
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python poster.py