Skip to content

Commit

Permalink
wip: allow specifying version
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Nov 26, 2024
1 parent 98311f2 commit c3809ba
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
4 changes: 3 additions & 1 deletion actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,14 @@ runs:
TIMONI=$(echo "$BP" | jq -r .global.ci.providers.timoni.install)
if [[ "$TIMONI" == "true" ]]; then
INSTALL=1
VERSION=$(echo "$BP" | jq -r .global.ci.providers.timoni.version)
echo "install=$INSTALL" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
else
echo "Not installing Timoni CLI"
fi
- name: Install Timoni
uses: stefanprodan/timoni/actions/setup@main
if: steps.timoni.outputs.install && steps.timoni.conclusion == 'success'
with:
version: latest
version: ${{ steps.timoni.outputs.version }}
12 changes: 9 additions & 3 deletions lib/project/schema/_embed/schema.cue
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ version: "1.0"
// +optional
target?: string @go(Target)
}
#Tagging: {
strategy: "commit"
}
#GlobalRepo: {
// Name contains the name of the repository (e.g. "owner/repo-name").
name: string @go(Name)
Expand Down Expand Up @@ -287,6 +290,12 @@ version: "1.0"

// Registries contains the registries to use for publishing Timoni modules
registries: [...string] @go(Registries,[]string)

// The version of Timoni to use in CI.
// +optional
version: (_ | *"latest") & {
string
} @go(Version)
}

// Secret contains the secret provider and a list of mappings
Expand All @@ -313,6 +322,3 @@ version: "1.0"
// Provider contains the provider to use for the secret.
provider: string @go(Provider)
}
#Tagging: {
strategy: "commit"
}
4 changes: 4 additions & 0 deletions lib/project/schema/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,8 @@ type TimoniProvider struct {

// Registries contains the registries to use for publishing Timoni modules
Registries []string `json:"registries"`

// The version of Timoni to use in CI.
// +optional
Version string `json:"version"`
}
4 changes: 4 additions & 0 deletions lib/project/schema/providers_go_gen.cue
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ package schema

// Registries contains the registries to use for publishing Timoni modules
registries: [...string] @go(Registries,[]string)

// The version of Timoni to use in CI.
// +optional
version?: string @go(Version)
}
4 changes: 4 additions & 0 deletions lib/project/schema/schema_overrides.cue
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ package schema
#Tagging: {
strategy: _ & "commit"
}

#TimoniProvider: {
version: _ | *"latest"
}

0 comments on commit c3809ba

Please sign in to comment.