Skip to content

Commit

Permalink
⚙️ chore: Better Table for Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zrosenbauer committed Feb 15, 2024
1 parent 68c8ac5 commit 018dce8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ jobs:
| Field | Required | Description | Default |
| ----- | -------- | ----------- | ------- |
| name | yes | The name of the service (must be unique) to be deployed. | - |
| port | no | The port that the application will run on in the container. | 8080 |
| env_vars | no | List of environment variables that will be injected during runtime, each on a new line. | - |
| secrets | no | List of secrets that will be injected during runtime, each on a new line. | - |
| flags | no | List of flags that will be injected during runtime. | - |
| gcp_region | yes | The GCP Region where the service will be deployed. | us-central1 |
| gcp_project_id | yes | The GCP Project ID where the service will be deployed. | - |
| gcp_service_account_key | yes | The Service Account JSON Key used to push images to the GCP Artifact Registry. | - |
| gcp_artifact_repository | yes | The Artifact Registry name, you can override for custom names (i.e. the 'acme' in us-docker.pkg.dev/able-sailor-21423/acme) | - |
| github_token | yes | Github Token, pass in the `secrets.GITHUB_TOKEN`. | - |
| docker_file_name | yes | The Dockerfile name, you can override for custom names (i.e. DevDockerfile) | Dockerfile |
| docker_directory | yes | Directory where the DockerFile is located. | . |
| port | no | The port that the application will run on in the container. | 8080 |
| env_vars | no | List of environment variables that will be injected during runtime, each on a new line. | - |
| secrets | no | List of secrets that will be injected during runtime, each on a new line. | - |
| flags | no | List of flags that will be injected during runtime. | - |
| docker_build_args | no | Comma separated list of arguments that will be injected during the build, each on a new line. | - |

### Outputs
Expand Down
6 changes: 5 additions & 1 deletion scripts/build-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ const run = () => {
.h3('Inputs')
.table([
['Field', 'Required', 'Description', 'Default'],
...inputs,
...inputs.sort((a, b) => {
if (a[1] === 'yes' && b[1] === 'no') return -1;
if (a[1] === 'no' && b[1] === 'yes') return 1;
return 0;
}),
])
.h3('Outputs')
.table([
Expand Down

0 comments on commit 018dce8

Please sign in to comment.