Skip to content

fix: quote colon-containing description in publish-single-page-docs action manifest - #40

Merged
oto-macenauer-absa merged 2 commits into
masterfrom
fix/action-yml-token-description
Aug 4, 2026
Merged

fix: quote colon-containing description in publish-single-page-docs action manifest#40
oto-macenauer-absa merged 2 commits into
masterfrom
fix/action-yml-token-description

Conversation

@oto-macenauer-absa

@oto-macenauer-absa oto-macenauer-absa commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

The github-token input description in actions/publish-single-page-docs/action.yml was written as an unquoted plain scalar containing contents: write. In YAML, a : inside a plain scalar starts a nested mapping, so GitHub's action-manifest parser rejected the file with "Mapping values are not allowed in this context" at Set up job time — before any step ran. That broke every workflow consuming the action.

Failing run: https://github.com/AbsaOSS/organizational-workflows/actions/runs/30910992670

Fix

Moved the description into a >- folded block, matching the style already used by the other input descriptions in the same file:

  github-token:
    description: >-
      Token used to upload the release asset. Needs `contents: write`.

Nothing else in the manifest changed.

Validation

  • Parsed actions/**/*.yml and .github/workflows/*.yml with PyYAML 6.0.3 — all five files parse cleanly.
  • Confirmed the pre-fix line reproduces the failure: PyYAML reports mapping values are not allowed here on the original scalar.
  • Scanned the same file set for other unquoted plain scalars containing : (the identical bug pattern); the detector was sanity-checked against the known-bad line and found no further instances.

Also: CI now validates action manifests

Nothing in CI would have caught this. The repository's own workflows are valid YAML, but action.yml is a consumer-facing manifest that is only parsed when a downstream repository runs the action — which is why the break surfaced in organizational-workflows rather than here.

This PR therefore also adds a Validate action manifests step to the existing publish-single-page-docs CI job, which YAML-parses every actions/**/*.yml and actions/**/*.yaml file and fails the build on a parse error, printing each file it checked so a passing run is auditable.

It parses with the yaml@2.7.1 package the action already pins and the job already installs, so there is no new dependency, no new config file and no extra runner — and it is the same parser the action uses at runtime. node_modules is excluded from the walk, and an empty match set is treated as a failure so the check cannot silently pass if the layout changes.

Verified by extracting the run script straight out of ci.yml and executing it verbatim:

  • On this branch it passes (exit 0): ok actions/publish-single-page-docs/action.yml
  • Re-introducing the broken line fails it (exit 1) with Nested mappings are not allowed in compact mappings at line 26, column 18 — confirming the gate actually catches the bug this PR fixes, rather than passing vacuously.

Fixes #39

🤖 Generated with Claude Code

https://claude.ai/code/session_01CRZk4ZQsApxLANJtzQpVXb

oto-macenauer-absa and others added 2 commits August 4, 2026 15:01
…ction manifest

The github-token input description contained an unquoted "contents: write",
which GitHub's action manifest parser rejects ("Mapping values are not
allowed in this context"), causing every consuming workflow to fail at job
setup.

Fixes #39

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRZk4ZQsApxLANJtzQpVXb
Action manifests under actions/ are only parsed by downstream consumers'
runners, so a syntax error ships silently and breaks every consuming
workflow. Parse them in CI so the break surfaces here first.

Refs #39

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRZk4ZQsApxLANJtzQpVXb
@oto-macenauer-absa
oto-macenauer-absa merged commit fa935dc into master Aug 4, 2026
7 checks passed
@oto-macenauer-absa
oto-macenauer-absa deleted the fix/action-yml-token-description branch August 4, 2026 13:21
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.

publish-single-page-docs action.yml fails to parse — unquoted colon in github-token description

1 participant