blob: 47e930d23f8fa87676e06ac6786b77b212ddd9e1 [file] [log] [blame]
package ci
import (
"tool/file"
"tool/http"
"tool/exec"
"encoding/yaml"
)
command: genworkflows: task: {
for w in workflows {
"\(w.file)": file.Create & {
filename: w.file
contents: """
# Generated by internal/ci/ci_tool.cue; do not edit
\(yaml.Marshal(test))
"""
}
}
}
// vendorgithubschema is expected to be run within the cuelang.org/go
// cue.mod directory
command: vendorgithubschema: {
get: http.Get & {
request: body: ""
url: "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json"
}
convert: exec.Run & {
stdin: get.response.body
cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l Workflow:: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/schemas/json/github-workflow.cue"
}
}