radolan_cron #654
This file contains 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: DWD Radolan Harvester | |
on: | |
workflow_dispatch: {} | |
repository_dispatch: | |
# This action can be triggered via Github API webook (see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch) | |
types: [radolan_cron] | |
jobs: | |
rain: | |
# Using the payload of the repository_dispatch webhook to specify the environment | |
environment: "${{ github.event.client_payload.environment }}" | |
runs-on: ubuntu-latest | |
name: Aggregate rain data from DWD radolan | |
steps: | |
- name: Get the source | |
uses: actions/checkout@v4 | |
- name: build the harvester | |
run: cd dwd-harvester/harvester && docker build --tag "${GITHUB_REPOSITORY}:${GITHUB_REF##*/}" . | |
- name: run the harvester | |
run: > | |
docker run --env PG_SERVER=${{ vars.PG_SERVER }} \ | |
--env PG_DB=${{ vars.PG_DB }} \ | |
--env PG_PORT=${{ vars.PG_PORT }} \ | |
--env PG_USER=${{ vars.PG_USER }} \ | |
--env PG_PASS=${{ secrets.PG_PASS }} \ | |
--env SUPABASE_URL=${{ vars.SUPABASE_URL }} \ | |
--env SUPABASE_BUCKET_NAME=${{ vars.SUPABASE_DATA_ASSETS_BUCKET }} \ | |
--env SUPABASE_SERVICE_ROLE_KEY=${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} \ | |
--env MAPBOXTOKEN=${{ secrets.MAPBOXTOKEN }} \ | |
--env MAPBOXUSERNAME=${{ vars.MAPBOXUSERNAME }} \ | |
--env MAPBOXTILESET=${{ vars.MAPBOXTILESET }} \ | |
--env MAPBOXLAYERNAME=${{ vars.MAPBOXLAYERNAME }} \ | |
--env LOGGING='INFO' \ | |
--env OUTPUT=True \ | |
--network host \ | |
"${GITHUB_REPOSITORY}:${GITHUB_REF##*/}" |