-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stelios Daveas
authored and
Stelios Daveas
committed
Oct 29, 2023
1 parent
e3f00c5
commit 6dae850
Showing
3 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Daily Weather Forecast | ||
|
||
on: | ||
schedule: | ||
# Runs every hour | ||
- cron: '0 * * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
forecast: | ||
runs-on: ubuntu-latest | ||
environment: API_KEYS | ||
|
||
steps: | ||
- name: Echo variables | ||
run: | | ||
echo hours: ${{ vars.GC_TIMEDELTA_HOURS }} | ||
echo lat: ${{ vars.LAT }} | ||
echo lon: ${{ vars.LON }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install Pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install dependencies using Pipenv | ||
run: | | ||
pipenv install --deploy --ignore-pipfile | ||
- name: Run forecast.py using Pipenv | ||
run: pipenv run python forecast.py | ||
env: | ||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} | ||
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }} | ||
OW_API_KEY: ${{ secrets.OW_API_KEY }} | ||
GC_API_KEY: ${{ secrets.GC_API_KEY }} | ||
GC_ID: ${{ secrets.GC_ID }} | ||
GC_TIMEDELTA_HOURS: ${{ vars.GC_TIMEDELTA_HOURS }} | ||
LAT: ${{ vars.LAT }} | ||
LON: ${{ vars.LON }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters