#Kinto Github Actions
Kinto Github Actions
Github actions for KintoHub
✨ initial commit
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM kintohub/kinto-cli:latest | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Trigger Deploy | ||
|
||
Github action for KintoHub for CI/CD. `Trigger Deploy` uses [Kinto-CLI](https://github.com/kintoproj/kinto-cli) underneath to trigger deploys for any given service. | ||
|
||
## Usage | ||
|
||
### Parameters | ||
|
||
|
||
| parameter | description | required | | ||
| --------- | --------------------------------- | -------- | | ||
| core_host | The host address of your KintoHub instance. Should be supplied in the format `Host:Port` | true | | ||
| environment_id | Environment Id of the service that you want CI/CD functionality for. | true | | ||
| service_name | Name of the service that you want CI/CD for. | true | | ||
|
||
|
||
|
||
To use this action for CI/CD functionality, create a `Github Workflow` in the github repo of your service. | ||
|
||
### Example Github Workflow : | ||
|
||
> .github/workflows/trigger-deploy.yml | ||
```yaml | ||
name: Trigger Deploy | ||
on: | ||
push: | ||
branches : [ main ] | ||
jobs: | ||
trigger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: trigger deploy | ||
uses: kintoproj/kinto-github-actions/[email protected] | ||
with: | ||
core_host: core.oss.kintohub.net:443 | ||
environment_id: 600f12ceb32a91c8d7b3f72d | ||
service_name: nodejs | ||
|
||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: kinto-github-actions | ||
description: Trigger deploy a service inside an environment for a KintoHub instance. | ||
author: sumitkolhe | ||
branding: | ||
icon: upload-cloud | ||
color: blue | ||
inputs: | ||
core_host: | ||
description: Core Host for the KintoHub instance. | ||
required: true | ||
environment_id: | ||
description: Environment id of the desired service. | ||
required: true | ||
service_name: | ||
description: Name of the service that needs to be trigger deployed. | ||
required: true | ||
|
||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
kinto init $INPUT_CORE_HOST | ||
kinto deploy $INPUT_ENVIRONMENT_ID $INPUT_SERVICE_NAME |