-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (106 loc) · 3.78 KB
/
create_arche_ttl.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Dump Baserow tables and create ARCHE turtle files
on:
workflow_dispatch:
inputs:
database_id:
type: number
description: '(Required) Database ID as number'
required: true
default: 0
project_name:
type: string
description: '(Required) Project Name as string'
required: true
default: ''
resource_files_url:
type: string
description: '(Optional) Latest Release of Resource Files as URL'
required: false
default: ''
primary_data_directory:
type: string
description: '(Optional) Primary Data Directory Path as string'
required: false
default: ''
primary_file_format:
type: string
description: '(Optional) Primary File Format as string'
required: false
default: 'xml'
resource_files_url_2:
type: string
description: '(Optional) Latest Release of Additional Resource Files as URL'
required: false
default: ''
secondary_data_directory:
type: string
description: '(Optional) Secondary Data Directory Path as string'
required: false
default: ''
secondary_file_format:
type: string
description: '(Optional) Secondary File Format as string'
required: false
default: 'xml'
jobs:
update_baserow:
name: Dump Baserow tables and create ARCHE turtle files
runs-on: ubuntu-latest
env:
PRIMARY_FILE_FORMAT: ${{ github.event.inputs.primary_file_format }}
LATEST_RELEASE: ${{ github.event.inputs.resource_files_url }}
PRIMARY_DATA_DIRECTORY: ${{ github.event.inputs.primary_data_directory }}
ADDITIONAL_FILE_FORMAT: ${{ github.event.inputs.secondary_file_format }}
ADDITIONAL_RESOURCES: ${{ github.event.inputs.resource_files_url_2 }}
ADDITIONAL_DATA_DIRECTORY: ${{ github.event.inputs.secondary_data_directory }}
PROJECT_NAME: ${{ github.event.inputs.project_name }}
BASEROW_TOKEN: ${{ secrets.BASEROW_TOKEN }}
BASEROW_DB_ID: ${{ github.event.inputs.database_id }}
BASEROW_USER: ${{ secrets.BASEROW_USER }}
BASEROW_PW: ${{ secrets.BASEROW_PW }}
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Baserow Dump and TEI/XML Download
run: |
python scripts/baserow_dump.py
- name: Adding attributes to TEI root node
run: |
./shellscripts/add_attributes.sh
./shellscripts/denormalize.sh
- name: Run ant to add xml-model schema
run: |
apt-get update && apt-get install openjdk-11-jre-headless ant -y --no-install-recommend
./shellscripts/dl_saxon.sh
ant
- name: Creating ARCHE constants ttl file
run: |
python scripts/arche_constants.py
# - name: cache AV database
# id: avdb
# uses: actions/cache@v3
# with:
# path: ~/.cvdupdate
# key: constant
# - name: refresh AV database
# run: |
# python3 -m pip install --user cvdupdate && cvd update
# - name: Verify Binaries with repo-filechecker
# run: |
# ./shellscripts/filechecker.sh
# - name: Verify RDF Metadata with arche-metadata-crawler
# run: |
# composer require "acdh-oeaw/arche-metadata-crawler:^0.5.0"
# ./shellscripts/crawler.sh
- name: Commit data
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Downloaded/Updated Data