Skip to content

Add central run-bids-validation + run-pr-merge workflows #11

Closed

Description

@neuromechanist

Phase 4 of nemarOrg/nemar-cli#601. Two central workflows that pair with thin per-repo shims (nemarOrg/nemar-cli#611).

GitHub PR events don't fan out across orgs, so unlike Phases 1-3 (push/tag-triggered), these PR-triggered workflows need a per-repo shim that dispatches at .github. The shim is ~25-30 lines and never changes; all actual logic lives here.

What

run-bids-validation.yml

  • repository_dispatch[run-bids-validation] + workflow_dispatch.
  • Inputs / client_payload: dataset_id, ref, head_sha, pr_number (optional, only set on PR-triggered runs).
  • Mints per-repo App token, creates a check-run on the dataset repo with status=in_progress so the PR reviewer sees a pending check.
  • Checks out the dataset repo at head_sha, runs the deno BIDS validator with the same jq pipeline + annex-pointer filtering as the legacy per-repo workflow.
  • Updates the check-run with conclusion=success / failure and a human-readable summary.

run-pr-merge.yml

  • repository_dispatch[run-pr-merge].
  • Inputs / client_payload: dataset_id, pr_number.
  • Mints per-repo App token, checks out the dataset repo at main.
  • Reads Version from dataset_description.json, creates the matching vX.Y.Z tag + GitHub release via gh CLI.
  • The legacy template's cleanup-staging job stays inline on the dataset-repo shim because it's AWS-only with no GitHub coupling.

Both workflows run permissions: {} at the job level and authenticate to GitHub via the per-repo App token; AWS work uses the standard org secrets.

Test plan

After merge:

gh workflow run run-bids-validation.yml --repo nemarDatasets/.github \
  -f dataset_id=nm099999 -f ref=main -f head_sha=<sha>

gh workflow run run-pr-merge.yml --repo nemarDatasets/.github \
  -f dataset_id=nm099999 -f pr_number=<n>

Expect green; the bids-validation run creates a check-run on nemarDatasets/nm099999 visible via gh api repos/nemarDatasets/nm099999/check-runs.

Activity

  1. added a commit that references this issue on May 23, 2026
    620bda1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions