run castro_weather.py #3
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
name: run castro_wheather.py | |
on: | |
schedule: | |
- cron: '0 */1 * * *' # Runs every hour. | |
jobs: | |
fetch_weather: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Script | |
env: | |
STATION_ID: ${{ secrets.STATION_ID }} | |
API_KEY: ${{ secrets.API_KEY }} | |
run: python castro_wheather.py "$STATION_ID" "$API_KEY" |