Skip to content

Commit

Permalink
docs: update usage of action-docs and main README.md for all actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanb committed Sep 10, 2024
1 parent 48fb1a2 commit 06fb950
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 27 deletions.
3 changes: 1 addition & 2 deletions .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
extends:
- "@open-turo/commitlint-config-conventional"
extends: ["@open-turo/commitlint-config-conventional"]
40 changes: 39 additions & 1 deletion integration-test/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
# GitHub Action Integration-Test

GitHub Action that conditionally executes integration tests via docker compose if the docker compose file is present.
<!-- prettier-ignore-start -->
<!-- action-docs-description source="integration-test/action.yaml" -->
## Description

Conditionally executes golang integration tests via docker, if docker compose file is found
<!-- action-docs-description source="integration-test/action.yaml" -->

<!-- action-docs-usage source="integration-test/action.yaml" -->
## Usage

```yaml
- uses: @
with:
checkout-repo:
# Perform checkout as first step of action
#
# Required: false
# Default: true

github-token:
# GitHub token for docker compose. e.g. 'secrets.GITHUB_TOKEN'.
#
# Required: true
# Default: ""

docker-compose-file:
# Relative or absolute path to docker-compose.yaml file
#
# Required: false
# Default: ./docker-compose.yaml

full-compose-output:
# Set this to true to log all container output from docker-compose
#
# Required: false
# Default: false
```
<!-- action-docs-usage source="integration-test/action.yaml" -->

## Usage

Expand All @@ -25,3 +62,4 @@ If the docker compose file is present, the action will run:
docker-compose up --build --exit-code-from test test
docker-compose down
```
<!-- prettier-ignore-end -->
27 changes: 22 additions & 5 deletions lint/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# GitHub Action Lint

<!-- prettier-ignore-start -->
<!-- action-docs-description -->
<!-- action-docs-description source="lint/action.yaml" -->
## Description

GitHub Action that lints a Terraform based repository via [action-pre-commit](https://github.com/open-turo/action-pre-commit)
<!-- action-docs-description source="lint/action.yaml" -->
## Description

GitHub Action that lints a Terraform based repository via [action-pre-commit](https://github.com/open-turo/action-pre-commit)
<!-- action-docs-description -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs -->
<!-- action-docs-inputs source="lint/action.yaml" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
| `github-token` | <p>GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `""` |
<!-- action-docs-inputs source="lint/action.yaml" -->
## Inputs

| parameter | description | required | default |
Expand All @@ -18,16 +29,22 @@ GitHub Action that lints a Terraform based repository via [action-pre-commit](ht
| github-token | GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN' | `true` | |
<!-- action-docs-inputs -->

<!-- action-docs-outputs -->
<!-- action-docs-outputs source="lint/action.yaml" -->

<!-- action-docs-outputs source="lint/action.yaml" -->

<!-- action-docs-outputs -->

<!-- action-docs-runs -->
<!-- action-docs-runs source="lint/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs source="lint/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->

<!-- action-docs-usage -->
<!-- action-docs-usage source="lint/action.yaml" -->
<!-- action-docs-usage -->
<!-- prettier-ignore-end -->
16 changes: 8 additions & 8 deletions prerelease/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# GitHub Action Release
# GitHub Action Pre-release

<!-- prettier-ignore-start -->
<!-- action-docs-description source="./prerelease/action.yaml" -->
<!-- action-docs-description source="prerelease/action.yaml" -->
## Description

GitHub Action that produces a new pre-release (snapshot) of a golang based repository.
<!-- action-docs-description source="./prerelease/action.yaml" -->
<!-- action-docs-description source="prerelease/action.yaml" -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs source="./prerelease/action.yaml" -->
<!-- action-docs-inputs source="prerelease/action.yaml" -->
## Inputs

| name | description | required | default |
Expand All @@ -20,23 +20,23 @@ GitHub Action that produces a new pre-release (snapshot) of a golang based repos
| `push-docker-snapshot` | <p>If a docker snapshot image is generated, push it to the to the registry</p> | `false` | `false` |
| `docker-username` | <p>Docker username to push the snapshot image to the registry</p> | `false` | `""` |
| `docker-password` | <p>Docker password to push the snapshot image to the registry</p> | `false` | `""` |
<!-- action-docs-inputs source="./prerelease/action.yaml" -->
<!-- action-docs-inputs source="prerelease/action.yaml" -->

<!-- action-docs-outputs source="./prerelease/action.yaml" -->
<!-- action-docs-outputs source="prerelease/action.yaml" -->
## Outputs

| name | description |
| --- | --- |
| `version` | <p>Version of the project</p> |
<!-- action-docs-outputs source="./prerelease/action.yaml" -->
<!-- action-docs-outputs source="prerelease/action.yaml" -->
## Outputs

| parameter | description |
| --- | --- |
| version | Version of the project |
<!-- action-docs-outputs -->

<!-- action-docs-runs source="./prerelease/action.yaml -->
<!-- action-docs-runs source="prerelease/action.yaml -->
## Runs

This action is a `composite` action.
Expand Down
56 changes: 51 additions & 5 deletions release/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# GitHub Action Release

<!-- prettier-ignore-start -->
<!-- action-docs-description -->
<!-- action-docs-description source="release/action.yaml" -->
## Description

GitHub Action that produces a new Release of a golang based repository.
<!-- action-docs-description source="release/action.yaml" -->
## Description

GitHub Action that produces a new Release of a golang based repository.
<!-- action-docs-description -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs -->
<!-- action-docs-inputs source="release/action.yaml" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
| `github-token` | <p>GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `""` |
| `go-version` | <p>Go version to use for building</p> | `true` | `1.17.3` |
<!-- action-docs-inputs source="release/action.yaml" -->
## Inputs

| parameter | description | required | default |
Expand All @@ -19,20 +31,54 @@ GitHub Action that produces a new Release of a golang based repository.
| go-version | Go version to use for building | `true` | 1.17.3 |
<!-- action-docs-inputs -->

<!-- action-docs-outputs -->
<!-- action-docs-outputs source="release/action.yaml" -->
## Outputs

| name | description |
| --- | --- |
| `version` | <p>Version of the project</p> |
<!-- action-docs-outputs source="release/action.yaml" -->
## Outputs

| parameter | description |
| --- | --- |
| version | Version of the project |
<!-- action-docs-outputs -->

<!-- action-docs-runs -->
<!-- action-docs-runs source="release/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs source="release/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->

<!-- action-docs-usage -->
<!-- action-docs-usage source="release/action.yaml" -->
## Usage

```yaml
- uses: @
with:
checkout-repo:
# Perform checkout as first step of action
#
# Required: false
# Default: true

github-token:
# GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'
#
# Required: true
# Default: ""

go-version:
# Go version to use for building
#
# Required: true
# Default: 1.17.3
```
<!-- action-docs-usage source="release/action.yaml" -->
<!-- action-docs-usage -->
<!-- prettier-ignore-end -->
46 changes: 40 additions & 6 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,67 @@
# GitHub Action Test

<!-- prettier-ignore-start -->
<!-- action-docs-description -->
<!-- action-docs-description source="test/action.yaml" -->
## Description

GitHub Action that executes unit tests present anywhere within a golang based GitHub repository and reports results including coverage metrics
<!-- action-docs-description source="test/action.yaml" -->
## Description

GitHub Action that executes unit tests present anywhere within a golang based GitHub repository and reports results including coverage metrics
<!-- action-docs-description -->
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
<!-- action-docs-inputs -->
<!-- action-docs-inputs source="test/action.yaml" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
| `github-token` | <p>GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `""` |
<!-- action-docs-inputs source="test/action.yaml" -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| checkout-repo | Perform checkout as first step of action | `false` | true |
| github-token | GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN' | `true` | |
<!-- action-docs-inputs -->

<!-- action-docs-outputs -->
<!-- action-docs-outputs source="test/action.yaml" -->

<!-- action-docs-outputs source="test/action.yaml" -->

<!-- action-docs-outputs -->

<!-- action-docs-runs -->
<!-- action-docs-runs source="test/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs source="test/action.yaml" -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->

<!-- action-docs-usage -->
<!-- action-docs-usage source="test/action.yaml" -->
## Usage

```yaml
- uses: @
with:
checkout-repo:
# Perform checkout as first step of action
#
# Required: false
# Default: true

github-token:
# GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN'
#
# Required: true
# Default: ""
```
<!-- action-docs-usage source="test/action.yaml" -->
<!-- action-docs-usage -->
<!-- prettier-ignore-end -->

0 comments on commit 06fb950

Please sign in to comment.