Skip to content

Commit 3d0cba1

Browse files
authored
Update update-ckan-metadata.yml to add 5createView.py to workflow
1 parent e53382d commit 3d0cba1

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/update-ckan-metadata.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install -r requirements.txt
30+
pip install -r extensions-workflow/requirements.txt
3131
3232
- name: Step 1 - Extract GitHub URLs from CKAN
3333
run: |
3434
echo "=== STEP 1: Extracting GitHub URLs from CKAN ==="
35+
cd extensions-workflow
3536
python 1getURL.py
3637
echo "✓ URL extraction completed"
3738
@@ -47,6 +48,7 @@ jobs:
4748
- name: Step 2 - Fetch Dynamic Metadata from GitHub
4849
run: |
4950
echo "=== STEP 2: Fetching dynamic metadata from GitHub ==="
51+
cd extensions-workflow
5052
python 2refresh.py
5153
echo "✓ Metadata extraction completed"
5254
@@ -62,12 +64,14 @@ jobs:
6264
- name: Step 3 - Update CKAN Catalog with Metadata
6365
run: |
6466
echo "=== STEP 3: Updating CKAN catalog with metadata ==="
67+
cd extensions-workflow
6568
python 3updateCatalog.py
6669
echo "✓ CKAN catalog update completed"
6770
6871
- name: Step 3.1 - Download Existing CSV from CKAN
6972
run: |
7073
echo "=== STEP 3.1: Downloading existing CSV from CKAN ==="
74+
cd extensions-workflow
7175
python 31download.py existing_metadata.csv
7276
echo "✓ CSV download completed"
7377
@@ -83,6 +87,7 @@ jobs:
8387
- name: Step 3.2 - Merge CSVs
8488
run: |
8589
echo "=== STEP 3.2: Merging existing and new CSV data ==="
90+
cd extensions-workflow
8691
python 32merger.py existing_metadata.csv dynamic_metadata_update.csv dynamic_metadata_update.csv
8792
echo "✓ CSV merge completed"
8893
@@ -98,34 +103,43 @@ jobs:
98103
- name: Step 3.3 - Delete Old Resource from CKAN
99104
run: |
100105
echo "=== STEP 3.3: Deleting old resource from CKAN ==="
106+
cd extensions-workflow
101107
python 33delete.py
102108
echo "✓ Old resource deletion completed"
103109
104110
- name: Step 4 - Upload New CSV to CKAN Dataset
105111
run: |
106112
echo "=== STEP 4: Uploading merged CSV to CKAN dataset ==="
113+
cd extensions-workflow
107114
# The upload script will use dynamic_metadata_update.csv (which is now merged)
108115
python 4uploadDataset.py
109116
echo "✓ CSV upload completed"
110117
118+
- name: Step 5 - Create Table View for Extensions Resource
119+
run: |
120+
echo "=== STEP 5: Creating table view for extensions resource ==="
121+
cd extensions-workflow
122+
python 5createView.py
123+
echo "✓ Table view creation completed"
124+
111125
- name: Upload artifacts on failure
112126
if: failure()
113127
uses: actions/upload-artifact@v4
114128
with:
115-
name: debug-files
129+
name: extensions-debug-files
116130
path: |
117-
*.csv
118-
*.log
131+
extensions-workflow/*.csv
132+
extensions-workflow/*.log
119133
retention-days: 7
120134

121135
- name: Upload generated CSVs as artifacts
122136
if: success()
123137
uses: actions/upload-artifact@v4
124138
with:
125-
name: metadata-csv-files
139+
name: extensions-metadata-csv-files
126140
path: |
127-
dynamic_metadata_update.csv
128-
existing_metadata.csv
141+
extensions-workflow/dynamic_metadata_update.csv
142+
extensions-workflow/existing_metadata.csv
129143
retention-days: 30
130144

131145
- name: Workflow Summary
@@ -136,6 +150,7 @@ jobs:
136150
echo "Timestamp: $(date -u)"
137151
138152
# Show file sizes if they exist
153+
cd extensions-workflow
139154
for file in url_list.csv dynamic_metadata_update.csv existing_metadata.csv; do
140155
if [ -f "$file" ]; then
141156
echo "$file: $(wc -l < "$file") lines, $(du -h "$file" | cut -f1)"
@@ -147,4 +162,3 @@ jobs:
147162
echo "Log files created:"
148163
ls -la *.log
149164
fi
150-

0 commit comments

Comments
 (0)