{
  "$schema": "https://json-schema.org/schema",
  "$id": "NxWorkspaceCIWorkflow",
  "title": "Generate a CI workflow.",
  "description": "Generate a CI workflow.",
  "cli": "nx",
  "type": "object",
  "properties": {
    "ci": {
      "type": "string",
      "description": "CI provider.",
      "enum": ["github", "circleci", "azure", "bitbucket-pipelines", "gitlab"],
      "x-prompt": {
        "message": "What is your target CI provider?",
        "type": "list",
        "items": [
          { "value": "github", "label": "GitHub Actions" },
          { "value": "circleci", "label": "Circle CI" },
          { "value": "azure", "label": "Azure DevOps" },
          { "value": "bitbucket-pipelines", "label": "BitBucket Pipelines" },
          { "value": "gitlab", "label": "Gitlab" }
        ]
      }
    },
    "name": {
      "type": "string",
      "description": "Workflow name.",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "default": "CI",
      "x-prompt": "How should we name your workflow?",
      "pattern": "^[a-zA-Z].*$"
    },
    "useRunMany": {
      "type": "boolean",
      "description": "Use 'nx run-many' instead of 'nx affected' in the generated CI workflow.",
      "default": false,
      "hidden": true
    }
  },
  "required": ["ci", "name"]
}
