Skip to content

.github/workflows/import_truth.yml #9

.github/workflows/import_truth.yml

.github/workflows/import_truth.yml #9

Workflow file for this run

name: "ImportTruthErviss"
on:
workflow_dispatch:
# scheduled run every Friday at 19.00 (18.00 UTC)
schedule:
- cron: '00 18 * * 5'
jobs:
import_truth_job:
if: github.repository_owner == 'european-modelling-hubs'
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.import_truth.outputs.imported_files }}
steps:
# Checkout the python tools repo
# -------------------------------------------
- name: checkout python tools repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: 'european-modelling-hubs/hub-tools'
ref: 'main'
path: './tools/'
# Checkout the data repository
# -------------------------------------------
- name: checkout data repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: 'european-modelling-hubs/flu-forecast-hub'
ref: 'main'
path: './repo/'
# Run Pyton code
# -------------------------
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install pycountry isoweek
- name: Import Truth
id: import_truth
run: |
python ./tools/code/import_truth.py --hub_path ./repo --disease_name "ILI"
- name: Commit data repo changes
uses: EndBug/add-and-commit@v7
with:
cwd: './repo'
message: "Updating Truth Data repo ..."
default_author: github_actions
push: true
call-persisting-wf:
needs: import_truth_job
uses: european-modelling-hubs/flu-forecast-hub/.github/workflows/persist_changes.yml@main
with:
changes-list: ${{ needs.import_truth_job.outputs.changed_files }}
secrets:
envPAT: ${{ secrets.GITHUB_TOKEN }}