-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (31 loc) · 1.02 KB
/
update-database.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
name: Weekly Database Update
on:
schedule:
- cron: "0 0 * * 0" # Run every Sunday at midnight
workflow_dispatch: # Manual trigger
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
TELRAAM_KEY: ${{ secrets.TELRAAM_KEY }}
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up R environment
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.x
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libssl-dev
- name: install packages
run: Rscript install-packages-update.R
- name: Run R script
run: Rscript update-database.R
- name: Commit and Push Changes
run: |
git config --global user.email '[email protected]'
git config --global user.name 'GitHub Actions'
git add .
git commit -m 'Update data files'
git push origin ${{ github.ref }}