Ensemble #49
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: "Ensemble" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "15 11,23 * * 2,3" | |
jobs: | |
ensemble: | |
if: github.repository_owner == 'european-modelling-hubs' | |
runs-on: ubuntu-20.04 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
install-r: false | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev libopenblas-base libopenblas-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Create ensembles | |
run: Rscript 'code/ensemble/EuroCOVIDhub/create-weekly-ensemble.R' | |
- name: Commit files | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Action - mean ensemble" | |
git add --all | |
git diff-index --quiet HEAD || git commit -m "Build ensemble" | |
git pull --rebase origin main | |
git push | |
echo "pushed to github" | |
- name: Create issue about failure | |
if: failure() && github.event_name != 'workflow_dispatch' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh issue reopen 2631 |