Skip to content

Get PDFs and post to Twitter #25275

Get PDFs and post to Twitter

Get PDFs and post to Twitter #25275

name: Get PDFs and post to Twitter
on:
workflow_dispatch:
schedule:
- cron: "2/20 * * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
environment: Production Twitter
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 }}
TWITTER_CONSUMER_KEY: ${{ vars.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ vars.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
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