Skip to content

Fetch weather

Fetch weather #11317

Workflow file for this run

name: Fetch weather
on:
workflow_dispatch:
schedule:
- cron: '0 0,3,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Feed
run: |-
curl "https://api.open-meteo.com/v1/forecast?latitude=38.74&longitude=-9.28&daily=weathercode,temperature_2m_max,temperature_2m_min&current_weather=true&forecast_days=1&timezone=Europe%2FLondon" | jq -r tostring > weather.json
- name: Commit and push changes
run: |-
git diff
git config user.name "Automated"
git config user.email "---"
git pull
git diff --quiet || (git add -A && git commit -m "Updated with latest weather")
git push