Skip to content

feat(ci): add central run-version-doi workflow - #8

Merged
neuromechanist merged 2 commits into
mainfrom
7-add-central-run-version-doi-workflow
May 23, 2026
Merged

neuromechanist merged 2 commits into
mainfrom
7-add-central-run-version-doi-workflow

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Closes #7. Phase 2 of nemarOrg/nemar-cli#601, sibling to #5 (run-enrichment.yml).

What

New .github/workflows/run-version-doi.yml — central version-DOI workflow for NEMAR datasets. Lifts the per-repo version-doi.yml template that previously shipped to every dataset repo by deployWorkflows() in nemarOrg/nemar-cli.

  • repository_dispatch[run-version-doi] from /webhooks/github when a v* tag is pushed (handler lands in Phase 2: centralize version-doi workflow nemarOrg/nemar-cli#606).
  • workflow_dispatch with dataset_id + tag inputs for manual recovery.
  • Mints a per-repo App installation token, checks out the target dataset repo at the tag.
  • Creates the GitHub release if missing.
  • Refreshes enrichment from the tag snapshot (continue-on-error; non-fatal). Uses --connect-timeout 10 --max-time 180 per the Phase 1 hardening (fix(run-enrichment): git add -f to override .gitignore on .nemar/ #6).
  • Publishes the version DOI via POST /webhooks/publish-version-doi.
  • Dispatches archive generation against nemarDatasets/<dataset_id> (NOT ${{ github.repository }} which would target .github). Stays correct until Phase 3 centralizes generate-archive.

permissions: {} at both job levels; all gh-cli calls authenticate via App token, not the default GITHUB_TOKEN.

Test plan

After merge:

gh workflow run run-version-doi.yml --repo nemarDatasets/.github \
  -f dataset_id=nm099999 -f tag=v0.0.0-rc1
gh run watch

Expect green. The publish-DOI step returns skipped: true for nm099999 (no concept DOI), which is the correct path-validation outcome — we're testing the dispatch + workflow plumbing, not the data.

Closes #7. Phase 2 of nemarOrg/nemar-cli#601. Sibling to #5 (run-enrichment.yml). Lifts the per-repo version-doi.yml into a single shared workflow. Triggered by repository_dispatch[run-version-doi] from /webhooks/github tag-push handler (lands in nemarOrg/nemar-cli#606).
@neuromechanist neuromechanist linked an issue May 23, 2026 that may be closed by this pull request
Code-review findings: 1) refresh step had continue-on-error + exit 0 redundancy; the continue-on-error alone suffices to keep the job moving, so make the script exit 1 on real failures so the step shows red in the Actions UI as an operator signal (matches run-enrichment.yml's discipline). 2) publish-version-doi step had no retry but was fatal on failure; add a 2-attempt retry with 10s backoff for 5xx and curl-level failures. 4xx remains terminal. The Worker idempotency guard for Zenodo duplicate mints landed in nemarOrg/nemar-cli#607 so retry-after-success-then-blip is safe.
@neuromechanist
neuromechanist merged commit 6668303 into main May 23, 2026
@neuromechanist
neuromechanist deleted the 7-add-central-run-version-doi-workflow branch May 23, 2026 15:28
neuromechanist added a commit that referenced this pull request May 23, 2026
Closes #9. Phase 3 of nemarOrg/nemar-cli#601. Sibling to #5 (run-enrichment) and #8 (run-version-doi). Lifts the per-repo generate-archive.yml template — already repository_dispatch-driven so the Worker just retargets the dispatch URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add central run-version-doi workflow

1 participant