-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (68 loc) · 2.08 KB
/
run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: "weekly_run"
on:
workflow_dispatch:
schedule:
- cron: "15 11 * * 3"
jobs:
weekly_run_fit:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.3'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev
- uses: r-lib/actions/setup-renv@v2-branch
- name: Create output objects
run: Rscript 'R/workflow/workflow_fit.R'
- name: Commit files
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action - Output without sims"
git add --all
git commit -m "Build output files"
git pull --rebase origin main
git push
echo "pushed to github"
- name: Create issue about failure
if: failure() && github.event_name != 'workflow_dispatch'
run: |
gh issue reopen 1234
weekly_run_sim:
needs: weekly_run_fit
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.3'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev
- uses: r-lib/actions/setup-renv@v2-branch
- name: Pull changes
run: |
git pull --rebase origin main
- name: Create output objects
run: Rscript 'R/workflow/workflow_sim.R'
- name: Commit files
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action - Final Output"
git add --all
git commit -m "Build output files"
git pull --rebase origin main
git push
echo "pushed to github"
- name: Create issue about failure
if: failure() && github.event_name != 'workflow_dispatch'
run: |
gh issue reopen 1234