Merge pull request #357 from kit-health-statistics-acc/submission/are… #40
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: "compute-ensemble" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'submissions/icosari/sari/KIT-TSMixer/*.csv' | |
| - 'submissions/agi/are/KIT-TSMixer/*.csv' | |
| # schedule: | |
| # - cron: "30 11,12,13,14 * * *" | |
| jobs: | |
| compute-ensemble: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| with: | |
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.2.3' | |
| - name: Cache R packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: r-${{ hashFiles('DESCRIPTION') }} | |
| - name: Compute ensemble | |
| run: | | |
| Rscript ./code/ensemble/compute_ensemble.R | |
| - name: Commit files | |
| env: | |
| AUTH: ${{ secrets.PAT_DW }} | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git remote rm origin | |
| git remote add origin https://${AUTH}@github.com/KITmetricslab/RESPINOW-Hub.git > /dev/null 2>&1 | |
| git pull origin main | |
| git add --all | |
| git commit --allow-empty -m "Compute ensemble" | |
| - name: Push changes | |
| run: | | |
| git push --quiet --set-upstream origin HEAD:main | |
| echo "pushed to github" | |
| # - name: Create Pull Request | |
| # id: cpr | |
| # uses: peter-evans/create-pull-request@v3 | |
| # with: | |
| # token: ${{ secrets.PAT_DW }} | |
| # commit-message: Update ensemble | |
| # committer: GitHub <noreply@github.com> | |
| # author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
| # signoff: false | |
| # branch: compute-ensemble | |
| # delete-branch: true | |
| # title: 'Compute ensemble' | |
| # body: | | |
| # Compute ensemble | |
| # labels: | | |
| # automated pr |