Skip to content

Commit

Permalink
chore: action workflow preamble
Browse files Browse the repository at this point in the history
Add preamble to the generated GitHub workflow yaml.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Sep 12, 2023
1 parent f9e39ef commit 1953ab7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-09-12T11:35:50Z by kres 3cbfe81-dirty.

name: default
"on":
push:
Expand Down
6 changes: 6 additions & 0 deletions internal/output/ghworkflow/gh_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ func (o *Output) GenerateFile(filename string, w io.Writer) error {
}

func (o *Output) config(w io.Writer) error {
preamble := output.Preamble("# ")

if _, err := w.Write([]byte(preamble)); err != nil {
return fmt.Errorf("failed to write preamble: %w", err)
}

encoder := yaml.NewEncoder(w)

defer encoder.Close() //nolint:errcheck
Expand Down

0 comments on commit 1953ab7

Please sign in to comment.