~/json-yaml-converter

Convert a GitHub Actions workflow between YAML and JSON

A .github/workflows/*.yml file converted to JSON for programmatic generation, drift-checking, or audit. GitHub also accepts the same schema as JSON if the action runner can read it.

# context

GitHub Actions workflows live in .github/workflows as YAML, but the schema is identical when expressed as JSON. Teams that generate workflows from a CDK-style tool produce JSON first; this converter is the round-trip check before committing.

# sample (JSON)

{
  "name": "CI",
  "on": {
    "push": { "branches": ["main"] },
    "pull_request": {}
  },
  "jobs": {
    "build": {
      "runs-on": "ubuntu-latest",
      "steps": [
        { "uses": "actions/checkout@v4" },
        {
          "uses": "actions/setup-node@v4",
          "with": { "node-version": "22" }
        },
        { "run": "npm ci" },
        { "run": "npm test" }
      ]
    }
  }
}

→ Open in JSON ↔ YAML converter (pre-filled)

# notes

# other examples