-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (35 loc) · 1.33 KB
/
datenraum.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
name: Sync metadata with Datenraum
on:
push:
branches: ["main"]
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
sync_datenraum:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install pipenv
run: |
python -m pip install --upgrade pip
pip install pipenv
- name: Install python requirements
run: pipenv install
- name: Download metadata from Serlo Metadata API
run: pipenv run python download_metadata.py public/serlo-metadata.json
- name: Validate nodes according to AMB Schema
run: pipenv run python validate_nodes.py
- name: Set credentials for Datenraum
run: |
echo "DATENRAUM_ENVIRONMENT=demo" >> "$GITHUB_ENV"
echo "CLIENT_ID=${{ secrets.CLIENT_ID_DEMO }}" >> "$GITHUB_ENV"
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET_DEMO }}" >> "$GITHUB_ENV"
- name: Download metadata from Datenraum
run: pipenv run python download_datenraum_nodes.py public/serlo-datenraum.json
- name: Sync metadata from Serlo Metadata API to Datenraum
run: pipenv run python update_datenraum_nodes.py public/serlo-metadata.json public/serlo-datenraum.json