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

Update doc for composite actions #50

Merged
merged 10 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
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
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# Github Action Composite
This is main of Composite GitHub Actions.
- build
- deploy
- rollback
- destroy (dev release)

# Basic Usage
You can choose 2 option strategy.

Option 1: Single Job
```
jobs:
build-push-deploy:
runs-on: k8s-runner

steps:
- name: Build
uses: kitabisa/composite-actions/build/backend@v1
with:
gh_user: ${{ secrets.GH_USER }}
gh_token: ${{ secrets.GH_TOKEN }}
.....................
<more input parameter>

- name: Deploy
uses: kitabisa/composite-actions/deploy/backend@v1
with:
env: ${{ env.ENV }}
gh_token: ${{ secrets.GH_TOKEN }}
project_id: ${{ secrets.GCP_PROJECT_ID_PROD }}
.....................
<more input parameter>
```


Option 2: Multiple Job
```
jobs:
build-push:
runs-on: k8s-runner
steps:
- name: Run build & push
uses: kitabisa/composite-actions/build/frontend@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID_PROD }}
credentials_json: ${{ secrets.GCP_SA_KEY_PROD }}
gcr_host: ${{ secrets.GCR_HOST }}
.....................
<more input parameter>

deploy:
runs-on: k8s-runner
needs: build-push
steps:
- name: Run deploy & prune
uses: kitabisa/composite-actions/deploy/frontend@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID_PROD }}
credentials_json: ${{ secrets.GCP_SA_KEY_PROD }}
gcr_host: ${{ secrets.GCR_HOST }}
.....................
<more input parameter>
```
37 changes: 37 additions & 0 deletions build/backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- action-docs-description -->
## Description

Build and push docker image
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| gh_user | gh user | `true` | |
| gh_token | gh token | `true` | |
| cache_dependency_path | go sum location | `false` | go.sum |
| go_version | go version | `false` | ^1.13.1 |
| build | Run make build | `false` | true |
| build_push_image | build and push image for deployment | `false` | false |
| build_push_image_swagger | build and push image for swagger | `false` | false |
| build_push_image_mockoon | build and push image for mockoon | `false` | |
| credentials_json | GCP credentials services account | `false` | |
| project_id | GCP project id | `false` | |
| gcr_host | GCP container registry host | `false` | |
| swagger_script_path | swagger script path | `false` | |
| openapi_input_file | openapi input file | `false` | |
| openapi_output_file | openapi output file | `false` | |
| working_directory | Set working directory | `false` | . |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
51 changes: 51 additions & 0 deletions build/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- action-docs-description -->
## Description

Frontend composite deployment
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| install | Run make install | `false` | true |
| config | Run make config | `false` | true |
| build | Run make build | `false` | true |
| package | Run make package | `false` | true |
| cache | Run action cache | `false` | true |
| project_id | GCP project id | `true` | |
| credentials_json | GCP credentials services account | `true` | |
| gcr_host | GCP container registry host | `true` | |
| setup_pnpm | Setup pnpm and cache modules | `false` | false |
| setup_yarn | Setup yarn and cache modules | `false` | false |
| chartmuseum_host | ChartMuseum host | `true` | |
| chartmuseum_user | ChartMuseum user | `true` | |
| chartmuseum_pass | ChartMuseum password | `true` | |
| working_directory | Set working directory | `false` | . |
| pnpm_version | Setup pnpm version | `false` | latest |
| using_nextjs | Setup next.js cache modules | `false` | false |
| using_cdn | Setup cdn for static assets | `false` | false |
| delete_oldest_cdn | Setup delete oldest cdn | `false` | true |
| cdn_aws_s3_bucket | CDN aws s3 bucket | `false` | |
| cdn_aws_access_key_id | CDN aws access key id | `false` | |
| cdn_aws_secret_access_key | CDN aws secret access key | `false` | |
| cdn_aws_region | CDN aws region | `false` | |
| cdn_source_dir | CDN source dir | `false` | |
| cdn_dest_dir | CDN dest dir | `false` | |
| cdn_keep_latest_version | CDN keep latest version length | `false` | 2 |
<!-- action-docs-inputs -->

<!-- action-docs-outputs -->
## Outputs

| parameter | description |
| --- | --- |
| build-time | Define build time |
<!-- action-docs-outputs -->

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
29 changes: 29 additions & 0 deletions build/static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- action-docs-description -->
## Description

Static web composite deployment
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| project_id | GCP project id | `true` | |
| credentials_json | GCP credentials services account | `true` | |
| gcr_host | GCP container registry host | `true` | |
| chartmuseum_host | ChartMuseum host | `true` | |
| chartmuseum_user | ChartMuseum user | `true` | |
| chartmuseum_pass | ChartMuseum password | `true` | |
| working_directory | Set working directory | `false` | . |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
25 changes: 25 additions & 0 deletions deploy/ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- action-docs-description -->
## Description

Run Ansible Playbooks
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| path | Ansible Playbook path | `true` | |
| ssh_private_key | SSH Private Key | `true` | |
| vault_password | Vault password | `false` | |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
37 changes: 37 additions & 0 deletions deploy/backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- action-docs-description -->
## Description

Build and push docker image
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| env | environment to deploy to | `true` | dev |
| gh_token | gh token | `true` | |
| project_id | GCP project id | `true` | |
| gcr_host | GCP container registry host | `true` | |
| chartmuseum_host | ChartMuseum host | `true` | |
| chartmuseum_user | ChartMuseum user | `true` | |
| chartmuseum_pass | ChartMuseum password | `true` | |
| gke_cluster_name | GKE cluster name | `true` | |
| gke_cluster_zone | GKE cluster location zone | `true` | |
| rancher_host | Rancher host | `true` | |
| rancher_access_key | Rancher access key | `true` | |
| rancher_secret_key | Rancher secret key | `true` | |
| rancher_cluster_id | Rancher cluster id | `true` | |
| working_directory | Set working directory | `false` | . |
| setup_helmfiles | Setup helmfiles | `false` | false |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
37 changes: 37 additions & 0 deletions deploy/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- action-docs-description -->
## Description

Frontend composite deployment
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| project_id | GCP project id | `true` | |
| credentials_json | GCP credentials services account | `true` | |
| gcr_host | GCP container registry host | `true` | |
| chartmuseum_host | ChartMuseum host | `true` | |
| chartmuseum_user | ChartMuseum user | `true` | |
| chartmuseum_pass | ChartMuseum password | `true` | |
| gke_cluster_name | GKE cluster name | `true` | |
| gke_cluster_zone | GKE cluster location zone | `true` | |
| rancher_host | Rancher host | `true` | |
| rancher_access_key | Rancher access key | `true` | |
| rancher_secret_key | Rancher secret key | `true` | |
| rancher_cluster_id | Rancher cluster id | `true` | |
| working_directory | Set working directory | `false` | . |
| preview_url | Set preview url | `false` | |
| prune | Run make prune | `false` | false |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
26 changes: 26 additions & 0 deletions deploy/terragrunt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- action-docs-description -->
## Description

Run Terragrunt Plan & Apply
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| path | Terragrunt path | `true` | |
| git_user | Git login user | `true` | |
| git_token | Git token access | `true` | |
| gcp_credentials | GCP credentials | `false` | |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
35 changes: 35 additions & 0 deletions destroy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- action-docs-description -->
## Description

Destroy release deployment
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| working_directory | Set working directory | `false` | . |
| credentials_json | GCP credentials services account | `true` | |
| gke_cluster_name | GKE cluster name | `true` | |
| gke_cluster_zone | GKE cluster location zone | `true` | |
| gcr_host | GCP container registry host | `true` | |
| project_id | GCP project id | `true` | |
| prune_all | make prune-all | `false` | false |
| using_cdn | Setup cdn for static assets | `false` | false |
| delete_oldest_cdn | Setup delete oldest cdn | `false` | true |
| cdn_aws_s3_bucket | CDN aws s3 bucket | `false` | |
| cdn_aws_access_key_id | CDN aws access key id | `false` | |
| cdn_aws_secret_access_key | CDN aws secret access key | `false` | |
| cdn_aws_region | CDN aws region | `false` | |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

This action is a `composite` action.
<!-- action-docs-runs -->
25 changes: 25 additions & 0 deletions packages/buildx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- action-docs-description -->
## Description

Setup Docker buildx credentials & cache
<!-- action-docs-description -->

<!-- action-docs-inputs -->
## Inputs

| parameter | description | required | default |
| --- | --- | --- | --- |
| project_id | GCP project id | `true` | |
| gcr_host | GCP container registry host | `true` | |
| cache | Run action cache | `false` | true |
<!-- action-docs-inputs -->

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

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

<!-- action-docs-runs -->
## Runs

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