Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Seoul Weather Data Per 5m #400

Seoul Weather Data Per 5m

Seoul Weather Data Per 5m #400

Workflow file for this run

# 서울 날씨를 5분마다 csv로 저장!!
name: Seoul Weather Data Per 5m
on: # 작업을 수행하는 조건
schedule: # 스케쥴링
- cron: "*/5 * * * *" # 매 5분마다
workflow_dispatch: # 수동 실행 가능
jobs: # 실행할 작업을 정의
request_weather:
runs-on: ubuntu-latest # 우분투 최신 환경
steps:
- name: 저장소 체크아웃
uses: actions/checkout@v3 # 현재 github 저장소를 가져온다
with: # 같이 진행할 작업
token: ${{ secrets.GITHUB_TOKEN }}
- name: Python 설정
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Python 패키지 설치
run: pip install requests
- name: 날씨 데이터 가져오기
env:
WEATHER_API_KEY: ${{ secrets.WEATHER_API_KEY }}
run: python weather.py
- name: 변경 사항 커밋 및 푸시
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git add seoul_weather.csv
git commit -m "Update weather data (auto)"
git push