epiforecasts-timeseries #94
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: "epiforecasts-timeseries" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * 1" | |
jobs: | |
generate-forecasts: | |
runs-on: ubuntu-20.04 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev libv8-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Generate forecasts | |
working-directory: models/${{ github.workflow }} | |
run: | | |
renv::restore() | |
source("main.R") | |
shell: Rscript {0} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.workflow }} | |
retention-days: 5 | |
path: models/${{ github.workflow }}/data-processed/** | |
upload-forecasts: | |
needs: generate-forecasts | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'european-modelling-hubs/covid19-forecast-hub-europe' | |
token: ${{ secrets.FORECASTHUB_TOKEN }} | |
- uses: actions/[email protected] | |
with: | |
name: ${{ github.workflow }} | |
path: data-processed | |
- uses: peter-evans/create-pull-request@67df31e08a133c6a77008b89689677067fef169e | |
id: cpr | |
with: | |
token: ${{ secrets.FORECASTHUB_TOKEN }} | |
commit-message: ${{ github.workflow }}'s automated submission | |
committer: epiforecasts-bot <[email protected]> | |
author: epiforecasts-bot <[email protected]> | |
branch: ${{ github.workflow }} | |
title: ${{ github.workflow }}'s automated submission | |
body: Automated submission for @sophiemeakin via https://github.com/european-modelling-hubs/covid19-forecast-hub-europe-submissions | |
delete-branch: true | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |