Update Static Solar Data #83
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 Static Solar Data | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" # todo dia às 03:00 UTC (~00:00 no Brasil) | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r data-pipeline/requirements.txt | |
| - name: Run data pipeline | |
| run: | | |
| python data-pipeline/fetch_horizons.py | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "solar-bot" | |
| git config user.email "solar-bot@users.noreply.github.com" | |
| git add data/planets_static.json | |
| git commit -m "chore(data): update static solar data" || echo "No changes to commit" | |
| git push |