Skip to content

Commit

Permalink
internal/ci: pin to the latest commit of schemastore GH actions schema
Browse files Browse the repository at this point in the history
This follows the landing of
SchemaStore/schemastore#3808 which fixes the
source JSON Schema in such a way as to make it a) more readable to the
human, b) apparently more correct (per the referenced conversation in
the JSON Schema Slack), and c) side-step https://cuelang.org/issue/3176.

We also make a change to a comment in the usr overlay (that explains the
need for a 'hotfix') that should have been made in response to a comment
from mvdan in https://cuelang.org/cl/1195124. No idea how this got
dropped.

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: Ibd833cefbeadf61e3aff0b8078ec5622efec5ad4
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195192
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
myitcv committed May 24, 2024
1 parent 927c503 commit 8192239
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -602,14 +602,12 @@ import "strings"

#jobNeeds: [...#name] & [_, ...] | #name

#matrix: ({
...
} | #expressionSyntax) & {
#matrix: {
{[=~"^(in|ex)clude$" & !~"^()$"]: #expressionSyntax | [...{
[string]: #configuration
}] & [_, ...]}
{[!~"^(in|ex)clude$" & !~"^()$"]: [...#configuration] & [_, ...] | #expressionSyntax}
}
} | #expressionSyntax

#reusableWorkflowCallJob: {
// The name of the job displayed on GitHub.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ package json
#job: ((#Workflow & {}).jobs & {x: _}).x
#step: ((#job & {steps: _}).steps & [_])[0]

// CUE does not properly encode a JSON Schema oneOf. This will be fixed in
// https://cuelang.org/issue/943, but for now we apply this patch.
//
// See also the discussion in https://cuelang.org/issue/3165 on how oneofs
// could/should be encoded in CUE. https://cuelang.org/issue/943 suggests one
// approach, https://cuelang.org/issue/3165 is a more general exploration of
// the space.
// CUE does not properly encode a JSON Schema oneOf; see
// https://cuelang.org/issue/3165. For now, apply a temporary workaround which
// forces the other option to bottom.
#Workflow: jobs?: [string]: steps?: [...(
{
uses?: _|_
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/vendor/vendor_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ command: importjsonschema: {

// Tip link for humans:
// https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json
url: "https://raw.githubusercontent.com/SchemaStore/schemastore/debca867d3174cc6c58f0ff40939c8a42300ea85/src/schemas/json/github-workflow.json"
url: "https://raw.githubusercontent.com/SchemaStore/schemastore/88d26ad0d451cbd5ebc70218062850aa905bdf18/src/schemas/json/github-workflow.json"
}
import: exec.Run & {
_outpath: path.FromSlash("../../cue.mod/pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue", "unix")
Expand Down

0 comments on commit 8192239

Please sign in to comment.