Skip to content

Send Tweet

Send Tweet #28444

Workflow file for this run

name: Send Tweet
on: # Run once every hour and on push
schedule:
- cron: '0 * * * *'
push:
branches:
- master
jobs:
tweet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create auth file
run: |
printf "'''auth module'''\n" >> auth.py
printf "$AUTH" >> auth.py
printf "\n" >> auth.py
shell: bash
env:
AUTH: ${{ secrets.AUTH }}
- name: Create Mastodon auth file
run: |
printf "'''auth module for Mastodon'''\n" >> masto_auth.py
printf "$MASTO_AUTH" >> masto_auth.py
printf "\n" >> masto_auth.py
shell: bash
env:
MASTO_AUTH: ${{ secrets.MASTO_AUTH }}
- name: Create BlueSky auth file
run: |
printf "'''auth module for bluesky'''\n" >> bluesky_auth.py
printf "$BLUESKY_AUTH" >> bluesky_auth.py
printf "\n" >> bluesky_auth.py
shell: bash
env:
BLUESKY_AUTH: ${{ secrets.BLUESKY_AUTH }}
- name: Send tweet
run: |
python beatles_lyrics_bot.py