Compare commits

..

8 commits
0.0.1 ... main

Author SHA1 Message Date
rzmk
e009754ba7 ci: fix namespace matrix value 2026-06-23 14:29:33 -04:00
rzmk
4067cdf382 build: include ENV from ARG 2026-06-23 14:24:32 -04:00
rzmk
566ea8cbc9 ci: fix build-args syntax 2026-06-23 14:21:24 -04:00
rzmk
1a82620420 ci: add build-args 2026-06-23 14:20:23 -04:00
rzmk
4f4c576d97 ci: set tag to namespace 2026-06-23 14:16:04 -04:00
rzmk
eb714aae81 fix: JSONL names 2026-06-23 14:13:44 -04:00
rzmk
c6de5d6690 ci: use secret outside of matrix 2026-06-23 14:01:31 -04:00
rzmk
0c4d9488f3 ci: fix syntax 2026-06-23 13:44:19 -04:00
4 changed files with 11 additions and 15 deletions

View file

@ -25,9 +25,9 @@ jobs:
with:
file: ./bulk_loader/Dockerfile
push: true
tags: ghcr.io/dathere/ckan_geoconnex_bulk_runner:latest
tags: ghcr.io/dathere/ckan_geoconnex_bulk_runner:${{ matrix.namespace }}
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 }}
build-args: |
NAMESPACE=${{ matrix.namespace }}

View file

@ -10,13 +10,7 @@ jobs:
publish:
strategy:
matrix:
ckan_instance: [
{
name: New_Mexico_Water_Data_Catalog,
url: https://catalog.newmexicowaterdata.org,
token: ${{ secrets.NMWDC_API_BULK_LOADER_TOKEN }}
}
]
ckan_instance: [{ name: New_Mexico_Water_Data_Catalog, url: https://catalog.newmexicowaterdata.org, token: NMWDC_API_BULK_LOADER_TOKEN }]
name: Publish JSONL file
runs-on: ubuntu-latest
steps:
@ -30,10 +24,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-${{ matrix.namespace }}.jsonl
gh release upload ${{github.event.release.tag_name}} ckan-geoconnex-web-resources-${{ matrix.namespace }}.jsonl
cargo run -p generate_release --release --verbose > ${{ matrix.ckan_instance.name }}.jsonl
gh release upload ${{github.event.release.tag_name}} ${{ matrix.ckan_instance.name }}.jsonl
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
NAMESPACE: ${{ matrix.namespace }}
NAMESPACE: ${{ matrix.ckan_instance.name }}
INSTANCE_URL: ${{ matrix.ckan_instance.url }}
API_TOKEN: ${{ matrix.ckan_instance.token }}
API_TOKEN: ${{ secrets[matrix.ckan_instance.token] }}

View file

@ -2,6 +2,8 @@ FROM rust:1.96 AS builder
WORKDIR /app
RUN rustup set profile minimal
COPY . .
ARG NAMESPACE
ENV NAMESPACE=$NAMESPACE
RUN cargo build -p bulk_loader --release
FROM ubuntu:latest

View file

@ -6,7 +6,7 @@ async fn main() -> Result<()> {
let namespace = std::env!("NAMESPACE");
// Get latest release data which is organized as a single JSONL file
// at https://github.com/dathere/ckan_geoconnex_bulk_runner/releases/latest
let body = reqwest::get(format!("https://github.com/dathere/ckan_geoconnex_bulk_runner/releases/latest/download/ckan-geoconnex-web-resources-{namespace}.jsonl"))
let body = reqwest::get(format!("https://github.com/dathere/ckan_geoconnex_bulk_runner/releases/latest/download/{namespace}.jsonl"))
.await?
.text()
.await?;