-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (42 loc) · 1.13 KB
/
weblate_libraries.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
name: Weblate Library Statistics Refresh
on:
workflow_dispatch:
schedule:
- cron: '10 12 * * *'
push:
branches:
- main
paths:
- 'weblate/Library Language Statistics/**'
- '.github/workflows/weblate_libraries.yml'
jobs:
Running_R_scripts:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: weblate/Library Language Statistics
steps:
- name: checkout_repo
uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- name: Install packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::httr
any::jsonlite
- name: Run R scripts
env:
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
run: |
Rscript "Library Language Statistics.R"
- name: Commit and Push Any Changes
run: |
git pull
git add *.csv
if ! git diff-index --quiet HEAD; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Updated weblate library csv"
git push
fi