Skip to content

Get PDFs and post to Mastodon #25435

Get PDFs and post to Mastodon

Get PDFs and post to Mastodon #25435

name: Get PDFs and post to Mastodon
on:
workflow_dispatch:
schedule:
- cron: "2/20 * * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
environment: Production Mastodon
permissions:
id-token: write
contents: read
env:
BUCKET_NAME: ${{ vars.BUCKET_NAME }}
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_ENVIRONMENT: ${{ vars.SENTRY_ENVIRONMENT }}
SENTRY_TRACES_SAMPLE_RATE: ${{ vars.SENTRY_TRACES_SAMPLE_RATE }}
MASTODON_API_BASE_URL: "https://overgrown.garden/"
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::820960796304:role/nyc-dot-projects-github
aws-region: us-east-1
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- run: sudo apt update && sudo apt install -y poppler-utils
- run: pip install -r requirements.txt
- run: python nyc_dot_bot.py