Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Style Guide #11330

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/manual/developer/04_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Shall remove the sample text from the template pull request
* Shall not have merge commits; they should have been taken out by [rebasing](https://docs.github.com/en/get-started/using-git/about-git-rebase)
* Should target `master` unless pulling an already merged pull request to a stabilization branch
* Shall have a useful title so that it can used in the changelog
* Shall have a useful title so that it can be used in the changelog

### Before Merging

Expand Down Expand Up @@ -448,6 +448,13 @@ Instead of:
* Must use 4-space indentation
* Shall put `do` or `then` on the same line as `for` or `if` respectively, e.g. `for file in *; do`

### GitHub Actions
* Shall follow all the rules in the [YAML](#yaml) section, expect the following:
* Existing files may use the `.yaml` prefix
* Job names should be in [Title case](https://en.wikipedia.org/wiki/Title_case)
* Shall use explicit version numbers for actions
* Updates are handled on a weekly basis by [Dependabot](https://github.com/ComplianceAsCode/content/network/updates)

### Kubernetes

* Shall follow all the rules in the [YAML](#yaml) section
Expand Down Expand Up @@ -518,7 +525,8 @@ or
* Shall use commands, including `if` etc., without extra spaces before or after `(` and `)` (Eg. `command(<args>)`
* `endif`, `endforeach`, and similar commands shall not have any arguments
* Shall keep flowing `)` at same indentation as starting clause
* Shall use no more than 2 empty lines (Eg. 1 empty to mark part and 2 empty to mark sections)
* Shall use no more than 2 empty lines (e.g. 1 empty to mark part and 2 empty to mark sections)
* Shall be written to pass [CMakeLint](https://pypi.org/project/cmakelint/)

## Markup Languages

Expand Down
Loading