daily scrapping #534
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: daily scrapping | |
| permissions: | |
| contents: read | |
| on: | |
| schedule: | |
| - cron: 0 14 * * * | |
| workflow_dispatch: | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "checkout repository" | |
| uses: EED-Solutions/eed_gha_workflows/.github/actions/checkout_code@main | |
| with: | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - name: install duckdb | |
| uses: EED-Solutions/eed_gha_workflows/.github/actions/install_duckdb@main | |
| - name: Get latest release tag | |
| id: get-latest-release | |
| run: | | |
| latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1 --branches main) --abbrev=0) | |
| echo "tag=$latest_tag" >> $GITHUB_OUTPUT | |
| echo $latest_tag | |
| - name: Checkout latest release | |
| uses: EED-Solutions/eed_gha_workflows/.github/actions/checkout_code@main | |
| with: | |
| ref: ${{ steps.get-latest-release.outputs.tag }} | |
| - name: "install uv and python" | |
| uses: EED-Solutions/eed_gha_workflows/.github/actions/install_uv@main | |
| with: | |
| version-file: .python-version | |
| - name: set up python environment | |
| uses: EED-Solutions/eed_gha_workflows/.github/actions/set_up_py_env@main | |
| - name: Run script | |
| env: | |
| MD_TOKEN: ${{ secrets.MD_TOKEN }} | |
| RUNS_ON_GA: ${{ vars.RUNS_ON_GA }} | |
| _EXECUTION_ENVIRONMENT_: ${{ vars._EXECUTION_ENVIRONMENT_ }} | |
| _EXECUTION_MODE_: ${{ vars._EXECUTION_MODE_ }} | |
| run: | | |
| runs_on_ga=$(uvx python -c "import os; print(os.getenv('RUNS_ON_GA'))") | |
| _environment_=$(uvx python -c "import os; print(os.getenv('_EXECUTION_ENVIRONMENT_'))") | |
| _execution_mode_=$(uvx python -c "import os; print(os.getenv('_EXECUTION_EXECUTION_MODE_'))") | |
| echo $runs_on_ga | |
| echo $_environment_ | |
| echo $_execution_mode_ | |
| uv run src/eed_webscrapping_scripts/dwd/pollenflug_gefahrenindex.py |