Set initial version to 1.0.0 for DOI publication #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: LLM Metadata Enrichment | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'README.md' | |
| - 'dataset_description.json' | |
| workflow_dispatch: | |
| jobs: | |
| enrich: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger enrichment | |
| env: | |
| NEMAR_WEBHOOK_TOKEN: ${{ secrets.NEMAR_WEBHOOK_TOKEN }} | |
| run: | | |
| REPO_NAME="${{ github.event.repository.name }}" | |
| # Skip if webhook token not configured | |
| if [ -z "$NEMAR_WEBHOOK_TOKEN" ]; then | |
| echo "NEMAR_WEBHOOK_TOKEN not configured, skipping LLM enrichment" | |
| exit 0 | |
| fi | |
| # Force re-enrichment on manual workflow_dispatch | |
| FORCE="false" | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| FORCE="true" | |
| fi | |
| echo "Triggering LLM enrichment for $REPO_NAME (force=$FORCE)" | |
| RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \ | |
| "https://api.osc.earth/nemar/webhooks/llm-enrich" \ | |
| -H "Content-Type: application/json" \ | |
| -H "X-Webhook-Token: $NEMAR_WEBHOOK_TOKEN" \ | |
| -d "{\"dataset_id\": \"$REPO_NAME\", \"force\": $FORCE}") | |
| HTTP_CODE=$(echo "$RESPONSE" | tail -1) | |
| BODY=$(echo "$RESPONSE" | head -n -1) | |
| echo "Response ($HTTP_CODE): $BODY" | |
| if [ "$HTTP_CODE" -ge 400 ]; then | |
| echo "::warning::LLM enrichment failed (HTTP $HTTP_CODE) - this is non-blocking" | |
| fi |