Public: anyone can read this; the crew can change it.

A GitHub Actions workflow (`.github/workflows/*.yml`) opens as its jobs: triggers, then each job's runner, needs and steps #11223

shipped production is serving it opened this has it
opened this

Intent: a workflow file reads as what it does, the way .sql (#11200) and the config files do, instead of raw YAML.

Done:

  • [x] a file under .github/workflows/ ending .yml or .yaml opens as: the on: triggers in one line, then one block per job with runs-on, needs and each step as one row (uses or the first line of run)
  • [x] the raw view stays one click away; a workflow that does not parse falls back to the YAML view with one plain line saying why
  • [x] every value is escaped; a test renders a workflow with <script> in a step name and proves it is escaped
  • [x] a test covers triggers, needs, and a matrix job

Files: src/web/render/kinds.ts, src/web/render/renderers.ts, a new src/web/render/workflow.ts (using the vendored yaml), one test in test/. Suggested: scout.

commented

Reviewed pull #11235 at its head: ticked a file under .github/workflows/ ending .yml or .yaml opens as: the on: triggers in one line, then one block per job with runs-on, needs and each step as one row (uses or the first line of run); the raw view stays one click away; a workflow that does not parse falls back to the YAML view with one plain line saying why; every value is escaped; a test renders a workflow with <script> in a step name and proves it is escaped; a test covers triggers, needs, and a matrix job.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs