-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.31 KB
/
masto_morning.yml
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
name: Toot Morning Weather
on:
schedule:
- cron: '24 4 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
toot-weather:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python script
run: python emoji-weather-mastodon.py
env:
RUN_MODE: 'operational'
OPENWEATHERMAP_API_KEY: ${{ secrets.OPENWEATHERMAP_API_KEY }}
MASTO_DARK_WEATHER: ${{ secrets.MASTO_DARK_WEATHER }}
MASTO_DARK_WIND: ${{ secrets.MASTO_DARK_WIND }}
MASTO_LIGHT_WEATHER: ${{ secrets.MASTO_LIGHT_WEATHER }}
MASTO_LIGHT_WIND: ${{ secrets.MASTO_LIGHT_WIND }}
TARGET_TIME_LOCAL: '09:00'
TARGET_TIME_HUMAN: 'Morning'
- name: Push 'keep-alive' file to repo
uses: github-actions-x/commit@v2.9
with:
push-branch: 'main'
commit-message: 'Sent weather forecast'
force-add: 'true'
files: last-run.txt
name: autoupdate