{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A recipe for Sourcehut CI service",
  "id": "https://json.schemastore.org/sourcehut-build-0.41.2.json",
  "properties": {
    "image": {
      "description": "Which OS image to build in",
      "type": "string"
    },
    "packages": {
      "description": "A list of packages to install on the image",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "repositories": {
      "description": "A list of extra repositories to enable with the image's package manager",
      "type": "object"
    },
    "sources": {
      "description": "A list of repositories to clone into the home directory of the build user in the build environment",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tasks": {
      "description": "A list of scripts to execute in the build environment"
    },
    "triggers": {
      "description": "A list of triggers to execute post-build, which can be used to send emails or do other post-build tasks",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "action": {
            "type": "string",
            "enum": ["email", "webhook"]
          },
          "condition": {
            "type": "string",
            "enum": ["always", "failure", "success"]
          }
        },
        "required": ["action", "condition"]
      }
    },
    "environment": {
      "description": "A list of key/value pairs for options to set in the build environment via ~/.buildenv",
      "type": "object"
    },
    "secrets": {
      "description": "List of secret UUIDs to be added to the guest during the build",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["image"],
  "title": "Sourcehut Build Manifest",
  "type": "object"
}
