Skip to content

Unit 7: Reusable translation workflow #145

Description

@mairas

Target repo: halos-org/shared-workflows

Goal: One caller stanza gives a translated docs repo the report, the comment,
the site build, the anchor check and the gate.

Requirements: R12, R13

Dependencies: Unit 6

Files:

  • Create: .github/workflows/translation-status.yml
  • Create: examples/translation-status-caller.yml
  • Modify: README.md

Approach:

  • workflow_call, with a header comment stating caller requirements, matching
    pr-checks.yml.
  • Checkout uses full history: the report resolves the stamped blob to show the
    English diff, and a shallow clone silently degrades that to a hint.
  • Step order is the design, not an accident: report to the job summary, post or
    patch the comment, build the site, check anchors, then apply the gate. A gate
    that aborts the job earlier would suppress the comment that explains why it is
    red.
  • A failed comment post must not fail the job. A pull request from a fork gets a
    read-only token, and a docs contributor should get a review, not a broken
    build.
  • Inputs to expose: runner, and the paths that trigger it are the caller's
    concern. Do not add a "translations off" input — a repo without i18n consumes
    the package directly instead (see Key Technical Decisions).
  • hatlabs/shared-workflows is not touched.

Patterns to follow:

  • .github/workflows/pr-checks.yml for the workflow_call shape and header
  • examples/ for the caller stanza convention

Test scenarios:

  • Test expectation: none — reusable workflows are not unit-testable here.
    Verification is by observed runs in Unit 8 and Unit 9.

Verification:

  • A deliberately stale branch in a scratch repo produces: a comment naming the
    stale pages, a job summary with the full report, and a red check.
  • The same branch with the comment step forced to fail still fails only on the
    gate, and the run reaches the gate step.

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