Skip to content

Commit

Permalink
feat: add configs for minlify tagging (#46)
Browse files Browse the repository at this point in the history
* feat: add configs for minlify tagging

* feat: add configs for minlify tagging
  • Loading branch information
ryan-timothy-albert authored Jun 17, 2024
1 parent 2c9c235 commit aef27ad
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ type PublishOn struct {
Push Push `yaml:"push"`
}

type TagOn struct {
Push Push `yaml:"push"`
WorkflowDispatch WorkflowDispatchTagging `yaml:"workflow_dispatch"`
}

type Push struct {
Branches []string `yaml:"branches"`
Paths []string `yaml:"paths"`
Expand All @@ -120,6 +125,13 @@ type GenerateWorkflow struct {
Jobs Jobs `yaml:"jobs"`
}

type TaggingWorkflow struct {
Name string `yaml:"name"`
Permissions Permissions `yaml:"permissions,omitempty"`
On TagOn `yaml:"on"`
Jobs Jobs `yaml:"jobs"`
}

type Permissions struct {
Checks string `yaml:"checks,omitempty"`
Contents string `yaml:"contents,omitempty"`
Expand All @@ -135,6 +147,7 @@ type GenerateOn struct {
type Jobs struct {
Generate Job `yaml:"generate,omitempty"`
Publish Job `yaml:"publish,omitempty"`
Tag Job `yaml:"tag,omitempty"`
}

type Job struct {
Expand All @@ -147,12 +160,16 @@ type WorkflowDispatch struct {
Inputs Inputs `yaml:"inputs"`
}

type WorkflowDispatchTagging struct {
}

type Schedule struct {
Cron string `yaml:"cron"`
}

type Inputs struct {
Force Force `yaml:"force"`
Force Force `yaml:"force"`
PushCodeSamplesOnly *PushCodeSamplesOnly `yaml:"push_code_samples_only,omitempty"`
}

type Force struct {
Expand All @@ -161,6 +178,12 @@ type Force struct {
Default bool `yaml:"default"`
}

type PushCodeSamplesOnly struct {
Description string `yaml:"description"`
Type string `yaml:"type"`
Default bool `yaml:"default"`
}

func GetDefaultConfig(newSDK bool, getLangDefaultFunc GetLanguageDefaultFunc, langs map[string]bool) (*Configuration, error) {
defaults := GetGenerationDefaults(newSDK)

Expand Down

0 comments on commit aef27ad

Please sign in to comment.