-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.26 KB
/
push-20.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
name: Update code list 20
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'CLR/Rec20/current/code-list.csv'
jobs:
diff:
runs-on: ubuntu-latest
environment:
name: test
url: https://test.uncefact.org/vocabulary/vocab-codes
steps:
- name: Check out this repo
uses: actions/checkout@v4
with:
fetch-depth: 0
path: vocab-codes
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout outpuuts repo
uses: actions/checkout@v4
with:
repository: uncefact/vocabulary-outputs
path: vocabulary-outputs
ref: vocab-codes
token: ${{ secrets.PAT_TOKEN }}
- name: Commit and push if it changed
run: |-
cd vocab-codes/CLR/Rec20/
python csv_to_json.py
cd ../../../
cp vocab-codes/CLR/Rec20/current/rec20.json vocabulary-outputs/_data
cd vocabulary-outputs
git config user.name "Automated"
git config user.email "[email protected]"
git add "_data/rec20.json"
git status
timestamp=$(date -u)
git commit -m "feat: update Recommendation Code List 20" || exit 0
git push origin vocab-codes