mirror of
https://github.com/dathere/ckan_geoconnex_bulk_runner.git
synced 2026-07-05 15:12:20 +00:00
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
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: NMWDC_API_BULK_LOADER_TOKEN }]
|
|
name: Publish JSONL file
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Install Rust stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
- name: Cache cargo deps and target folder
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: ". -> target"
|
|
- name: Run generate_release crate and upload JSONL file
|
|
run: |
|
|
cd ${{github.workspace}}
|
|
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 }}
|
|
INSTANCE_URL: ${{ matrix.ckan_instance.url }}
|
|
API_TOKEN: ${{ secrets[matrix.ckan_instance.token] }}
|