{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/build-yml/versions/0.41.2.json",
  "title": "Sourcehut Build Manifest",
  "description": "A recipe for Sourcehut CI service",
  "x-lintel": {
    "source": "https://www.schemastore.org/sourcehut-build-0.41.2.json",
    "sourceSha256": "8dab59e878a1cfd540f5c6407a54346c722ab6490dcb27e3e1bd3490174ee619",
    "fileMatch": [
      ".build.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "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",
        "required": [
          "action",
          "condition"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "email",
              "webhook"
            ]
          },
          "condition": {
            "type": "string",
            "enum": [
              "always",
              "failure",
              "success"
            ]
          }
        },
        "additionalProperties": true
      }
    },
    "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"
  ],
  "id": "https://json.schemastore.org/sourcehut-build-0.41.2.json"
}
