ci(data-deploy): forward favicon + description to relaton index - #59
Merged
Conversation
relaton#96 added `--favicon` and `--description` to `relaton index`, but the
shared Pages workflow did not expose them, so no relaton-data-* caller could
reach them — passing an undeclared input to a reusable workflow is a hard parse
error, which blocked relaton-data-w3c.
Declare both as optional `workflow_call` inputs defaulting to the empty string
and pass them unconditionally in both build steps: relaton-cli runs `presence`
on each value, so a caller that sets neither gets byte-identical output to
today. This restores the last per-flavor branding lost in the Jekyll ->
`relaton index` migration; each data repo's deleted `_config.yml` carried a
favicon and a description blurb, and only `title` survived.
Both values are free-form prose, and `${{ }}` is substituted as raw text before
bash parses the line, so they travel by env rather than inlined — an inlined
description reading `IEC "TC 1" registry` would word-split into stray argv
entries.
Also refresh spec/data_deploy_workflow_spec.rb, which still guarded the Jekyll
build (BUNDLE_GEMFILE -> Gemfile.deploy, `bundle exec jekyll build`) removed in
#58 and was therefore failing on main. It now guards the current caller
contract, including that both near-duplicate build steps carry every flag.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the two missing
workflow_callinputs sorelaton-data-*repos can restorethe per-flavor branding lost in the Jekyll →
relaton indexmigration.Why
relaton/relaton#96 (merged) added
--faviconand--descriptiontorelaton index, but this workflow does not expose them — its inputs are onlysource,title,data-dir,mode,relaton-cli-version,relaton-repo,relaton-ref. Callers cannot work around that: passing an undeclared input to areusable workflow is a hard parse error (
Invalid input, 'favicon' is not defined in the referenced workflow), sorelaton-data-w3cis blocked on this.Each data repo's deleted
_config.ymlcarried a favicon and a descriptionblurb;
titlesurvived the migration, these two did not. This is the lastmissing link.
What
workflow_callinputs,faviconanddescription, bothtype: string, bothdefault: "".git source). No conditional flag construction is needed: relaton-cli runs
presence(options[:favicon])/presence(options[:description])(
index_site_generator.rb:54-55, with a comment noting this exists preciselybecause a workflow renders an unset input as
--favicon ""). Callers thatpass nothing get byte-identical output to today.
env:and are referenced as"$FAVICON"rather thaninlined as
${{ inputs.favicon }}. They are free-form prose, and${{ }}issubstituted as raw text before bash parses the line — an inlined description
reading
IEC "TC 1" registrywould word-split into stray argv entries."Callers need no changes").
Spec refresh
spec/data_deploy_workflow_spec.rbstill guarded the Jekyll build that #58removed (
BUNDLE_GEMFILE→Gemfile.deploy,bundle exec jekyll build), so itwas already failing on
main. It now guards the current caller contract:every input optional, the two branding inputs declared with the load-bearing
empty default, exactly two build steps (one per source mode), and every one of
--title/--favicon/--description/--base-urlpresent in both —those near-duplicate command lines are the real drift risk.
Verification
bundle exec rake→ 179 examples, 0 failures.a7dc4f2a0that--favicon/--descriptionareplain string options on
relaton index(relaton-cli/lib/relaton/cli/command.rb:149-153).relaton-data-w3ccorpus (17,184 YAML docs) with those flagsproduced the expected
<meta name="description">and<link rel="icon" ... type="image/svg+xml">; passing""for both producedneither tag.
Release gate (unchanged)
gemmode still cannot work — no published relaton-cli hasindexat all.Repos piloting with
source: git(currentlyrelaton-data-w3c) build fromrelaton/relaton@mainand already have #96, so they pick up branding the momentthis merges, with no gem release needed.
Follow-ups (pre-existing, not in this PR)
Review of the surrounding file flagged some things landed in #58, listed here so
they are not lost:
permissions: contents: readzeroespages:forbuild_index_page,which still runs
actions/configure-pages@v4. Worth checking whether thataction needs
pages: write— note itsbase_pathoutput is no longer consumednow that
--baseurlis gone, so dropping the step may be simpler.title="${{ inputs.title }}"in Derive title has the same quoting hole fixedhere for the new inputs, and
echo "title=$title" >> "$GITHUB_OUTPUT"is notmultiline-safe.
RFCSUBSERIES Index,CALCONNECT Index), regressing thedisplay:names indata-index/configs.yml.spec/gemfile_deploy_spec.rband theGemfile.deployCimas mapping stillenforce a Jekyll bundle nothing consumes.