-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.81 KB
/
post.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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