data-flow #4945
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: data-flow | |
| on: | |
| schedule: | |
| - cron: '5 * * * *' # run hourly | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'CROCUS-Urban/ambient-weather-ingests' | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Setup Conda Environment | |
| uses: mamba-org/[email protected] | |
| with: | |
| environment-file: environment.yml | |
| micromamba-version: '2.0.0-0' | |
| init-shell: >- | |
| bash | |
| cache-downloads: true | |
| post-cleanup: "all" | |
| - name: Verify environment installation | |
| run: conda env list | |
| - name: Run the ambient weather api script | |
| shell: bash -l {0} | |
| env: | |
| AMBIENT_API_KEY: '${{ secrets.AMBIENT_API_KEY }}' | |
| AMBIENT_APPLICATION_KEY: '${{ secrets.AMBIENT_APPLICATION_KEY }}' | |
| AMBIENT_ENDPOINT: '${{ secrets.AMBIENT_ENDPOINT }}' | |
| run: | | |
| python process_ambient_data.py | |
| - name: Run the ambient weather api for DPI script | |
| shell: bash -l {0} | |
| env: | |
| AMBIENT_API_KEY: '${{ secrets.DPI_API_KEY }}' | |
| AMBIENT_APPLICATION_KEY: '${{ secrets.DPI_APPLICATION_KEY }}' | |
| AMBIENT_ENDPOINT: '${{ secrets.AMBIENT_ENDPOINT }}' | |
| run: | | |
| python process_ambient_data.py | |
| - name: Commit new changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: '-A' | |
| default_author: github_actions | |
| message: '[skip ci] Hourly data updates' |