.github/workflows/do_prediction.yml #83
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 20 * * *" | |
# push: | |
jobs: | |
build: | |
if: github.repository == 'mdietze/FluxCourseForecast' ## update to your username | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
container: | |
image: rocker/geospatial | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. | |
contents: write | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: install R packages | |
run: R -e 'source("install.R")' | |
- name: Run automatic prediction file | |
run: Rscript forecast.R | |
- name: Commit changes | |
run: git config --global --add safe.directory /__w/FluxCourseForecast/FluxCourseForecast | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'analysis/*.RDS' | |
author_name: Michael Dietze | |
author_email: dietze@bu.edu | |
# uses: stefanzweifel/git-auto-commit-action@v4 | |
# with: | |
# file_pattern: 'analysis/*.RDS' |