-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (40 loc) · 1.27 KB
/
refresh_data.yaml
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
on: workflow_dispatch
jobs:
generate-data:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
install-r: 'false'
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: prepare a new branch
run: |
git branch refresh_data
git checkout refresh_data
git rm ./data/*.Rds
git commit -S -m "removed existing Rds files"
- name: Download and process data
run: |
Rscript R/refresh_data.R
- name: Commit files
run: |
git add ./data
git commit -S -m "updated data (through GitHub Actions)"
git push --set-upstream origin refresh_data