feat: multi-CKAN-instance compatibility

This commit is contained in:
rzmk 2026-06-23 13:38:24 -04:00
parent 59564c9de3
commit 7c8fac233e
6 changed files with 55 additions and 33 deletions

View file

@ -6,6 +6,9 @@ on:
jobs:
build_and_push:
runs-on: ubuntu-latest
strategy:
matrix:
namespace: [New_Mexico_Water_Data_Catalog]
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
@ -26,3 +29,5 @@ jobs:
cache-from: type=gha,scope=ckan_geoconnex_bulk_runner
platforms: linux/amd64
cache-to: type=gha,mode=max,scope=ckan_geoconnex_bulk_runner
env:
NAMESPACE: ${{ matrix.namespace }}

View file

@ -2,11 +2,21 @@ name: Publish CKAN-Geoconnex JSONL file as latest release
on:
release:
types: [published]
workflow_dispatch:
permissions:
# To upload to releases
contents: write
jobs:
publish:
strategy:
matrix:
ckan_instance: [
{
name: New_Mexico_Water_Data_Catalog,
url: https://catalog.newmexicowaterdata.org,
token: ${{ secrets.NMWDC_API_BULK_LOADER_TOKEN }}
}
]
name: Publish JSONL file
runs-on: ubuntu-latest
steps:
@ -20,8 +30,10 @@ jobs:
- name: Run generate_release crate and upload JSONL file
run: |
cd ${{github.workspace}}
cargo run -p generate_release --release --verbose > ckan-geoconnex-web-resources.jsonl
gh release upload ${{github.event.release.tag_name}} ckan-geoconnex-web-resources.jsonl
cargo run -p generate_release --release --verbose > ckan-geoconnex-web-resources-${{ matrix.namespace }}.jsonl
gh release upload ${{github.event.release.tag_name}} ckan-geoconnex-web-resources-${{ matrix.namespace }}.jsonl
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
NMWDC_API_BULK_LOADER_TOKEN: ${{ secrets.NMWDC_API_BULK_LOADER_TOKEN }}
NAMESPACE: ${{ matrix.namespace }}
INSTANCE_URL: ${{ matrix.ckan_instance.url }}
API_TOKEN: ${{ matrix.ckan_instance.token }}