Skip to content

Post

Post #9165

Workflow file for this run

name: Post
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
tweet:
name: Tweet
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3
- id: install-pipenv
name: Install pipenv
run: pipx install pipenv
shell: bash
- id: install-python
name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pipenv"
- id: install-python-dependencies
name: Install Python dependencies
run: pipenv sync
- id: execute
name: Execute
run: |
pipenv run python cli.py abc7
pipenv run python cli.py metar
pipenv run python cli.py aqi
pipenv run python cli.py post
shell: bash
env:
EPA_API_KEY: ${{ secrets.EPA_API_KEY }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
MASTODON_CLIENT_KEY: ${{ secrets.MASTODON_CLIENT_KEY }}
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
- id: commit
name: Commit
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git config pull.rebase false
git pull origin $GITHUB_REF
git add ./
git commit -m "Updated METAR report" --author="palewire <palewire@users.noreply.github.com>" && git push || true
shell: bash