Update weather station list #230
This file contains hidden or 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: Update weather station list | |
| on: | |
| #push: | |
| # branches: [ main ] | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: exec fetecher | |
| run: | | |
| python fetcher.py | |
| - name: Commit files | |
| run: | | |
| git config --global user.email "allenstorm2005@gmail.com" | |
| git config --global user.name "Raingel(Github Action)" | |
| git config --global http.postBuffer 524288000 | |
| git add . | |
| git commit -m "last update: `date '+%Y-%m-%d %H:%M:%S'`" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: main |