@@ -64,14 +64,14 @@ type StringList []string
6464
6565type GithubActionsInput struct {
6666 Name string `json:"name"`
67- Description string `json:"description"`
67+ Description string `json:"description,omitempty "`
6868 Required bool `json:"required"`
6969 Type string `json:"type"`
7070}
7171
7272type GithubActionsOutput struct {
7373 Name string `json:"name"`
74- Description string `json:"description"`
74+ Description string `json:"description,omitempty "`
7575 Value string `json:"value"`
7676}
7777
@@ -81,19 +81,19 @@ type GithubActionsEnv struct {
8181}
8282
8383type GithubActionsStep struct {
84- ID string `json:"id"`
85- Name string `json:"name"`
86- If string `json:"if"`
87- Env GithubActionsEnvs `json:"env"`
88- Uses string `json:"uses"`
89- Shell string `json:"shell"`
90- Run string `json:"run" yaml:"run"`
91- WorkingDirectory string `json:"working_directory" yaml:"working-directory"`
92- With GithubActionsWith `json:"with"`
93- WithRef string `json:"with_ref" yaml:"-"`
94- WithScript string `json:"with_script" yaml:"-"`
84+ ID string `json:"id,omitempty "`
85+ Name string `json:"name,omitempty "`
86+ If string `json:"if,omitempty "`
87+ Env GithubActionsEnvs `json:"env,omitempty "`
88+ Uses string `json:"uses,omitempty "`
89+ Shell string `json:"shell,omitempty "`
90+ Run string `json:"run,omitempty " yaml:"run"`
91+ WorkingDirectory string `json:"working_directory,omitempty " yaml:"working-directory"`
92+ With GithubActionsWith `json:"with,omitempty "`
93+ WithRef string `json:"with_ref,omitempty " yaml:"-"`
94+ WithScript string `json:"with_script,omitempty " yaml:"-"`
9595 Line int `json:"line" yaml:"-"`
96- Action string `json:"action" yaml:"-"`
96+ Action string `json:"action,omitempty " yaml:"-"`
9797
9898 Lines map [string ]int `json:"lines" yaml:"-"`
9999}
@@ -128,18 +128,18 @@ type GithubActionsPermission struct {
128128
129129type GithubActionsEvent struct {
130130 Name string `json:"name"`
131- Types StringList `json:"types"`
132- Branches StringList `json:"branches"`
133- BranchesIgnore StringList `json:"branches_ignore"`
134- Paths StringList `json:"paths"`
135- PathsIgnore StringList `json:"paths_ignore"`
136- Tags StringList `json:"tags"`
137- TagsIgnore StringList `json:"tags_ignore"`
138- Cron StringList `json:"cron"`
139- Inputs GithubActionsInputs `json:"inputs"`
140- Outputs GithubActionsOutputs `json:"outputs"`
141- Secrets GithubActionsSecrets `json:"secrets"`
142- Workflows StringList `json:"workflows"`
131+ Types StringList `json:"types,omitempty "`
132+ Branches StringList `json:"branches,omitempty "`
133+ BranchesIgnore StringList `json:"branches_ignore,omitempty "`
134+ Paths StringList `json:"paths,omitempty "`
135+ PathsIgnore StringList `json:"paths_ignore,omitempty "`
136+ Tags StringList `json:"tags,omitempty "`
137+ TagsIgnore StringList `json:"tags_ignore,omitempty "`
138+ Cron StringList `json:"cron,omitempty "`
139+ Inputs GithubActionsInputs `json:"inputs,omitempty "`
140+ Outputs GithubActionsOutputs `json:"outputs,omitempty "`
141+ Secrets GithubActionsSecrets `json:"secrets,omitempty "`
142+ Workflows StringList `json:"workflows,omitempty "`
143143}
144144
145145type GithubActionsJobContainer struct {
@@ -148,7 +148,7 @@ type GithubActionsJobContainer struct {
148148
149149type GithubActionsJobEnvironment struct {
150150 Name string `json:"name"`
151- Url string `json:"url"`
151+ Url string `json:"url,omitempty "`
152152}
153153
154154type GithubActionsJobSecret struct {
@@ -158,18 +158,18 @@ type GithubActionsJobSecret struct {
158158
159159type GithubActionsJob struct {
160160 ID string `json:"id"`
161- Name string `json:"name"`
162- Uses string `json:"uses"`
163- Secrets GithubActionsJobSecrets `json:"secrets"`
164- With GithubActionsWith `json:"with"`
165- Permissions GithubActionsPermissions `json:"permissions"`
166- Needs StringList `json:"needs"`
167- If string `json:"if"`
161+ Name string `json:"name,omitempty "`
162+ Uses string `json:"uses,omitempty "`
163+ Secrets GithubActionsJobSecrets `json:"secrets,omitempty "`
164+ With GithubActionsWith `json:"with,omitempty "`
165+ Permissions GithubActionsPermissions `json:"permissions,omitempty "`
166+ Needs StringList `json:"needs,omitempty "`
167+ If string `json:"if,omitempty "`
168168 RunsOn GithubActionsJobRunsOn `json:"runs_on" yaml:"runs-on"`
169169 Container GithubActionsJobContainer `json:"container"`
170- Environment GithubActionsJobEnvironments `json:"environment"`
171- Outputs GithubActionsEnvs `json:"outputs"`
172- Env GithubActionsEnvs `json:"env"`
170+ Environment GithubActionsJobEnvironments `json:"environment,omitempty "`
171+ Outputs GithubActionsEnvs `json:"outputs,omitempty "`
172+ Env GithubActionsEnvs `json:"env,omitempty "`
173173 Steps GithubActionsSteps `json:"steps"`
174174 ReferencesSecrets []string `json:"references_secrets" yaml:"-"`
175175 Line int `json:"line" yaml:"-"`
@@ -181,8 +181,8 @@ type GithubActionsWorkflow struct {
181181 Path string `json:"path" yaml:"-"`
182182 Name string `json:"name"`
183183 Events GithubActionsEvents `json:"events" yaml:"on"`
184- Permissions GithubActionsPermissions `json:"permissions"`
185- Env GithubActionsEnvs `json:"env"`
184+ Permissions GithubActionsPermissions `json:"permissions,omitempty "`
185+ Env GithubActionsEnvs `json:"env,omitempty "`
186186 Jobs GithubActionsJobs `json:"jobs"`
187187}
188188
0 commit comments