Skip to content

Commit

Permalink
ci(cue): Add constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
staticaland committed Aug 27, 2022
1 parent 45ca094 commit ae66d60
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cue/workflows/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ package workflows

import "github.com/staticaland/go-whaturl/cue/common"

workflows: [...{
_#w: {
file: string
schema: (common.#workflow & {})
}]
}

// Make constraint for dashes in yml file names. Enforce file type. yml not yaml.
// ^[a-z-]+.yml
_#w: {
file: =~"^[a-z-]+\\.yml" // Lowercase and hyphens, must end with .yml (as opposed to .yaml)
}

workflows: [..._#w]

workflows: [
{
Expand Down

0 comments on commit ae66d60

Please sign in to comment.