https://github.com/minddocdev/deploy-action
Github action that manages kubernetes based deployments
https://github.com/minddocdev/deploy-action
github-actions github-actions-typescript
Last synced: 8 months ago
JSON representation
Github action that manages kubernetes based deployments
- Host: GitHub
- URL: https://github.com/minddocdev/deploy-action
- Owner: minddocdev
- License: mit
- Created: 2019-12-01T20:53:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:17:27.000Z (over 2 years ago)
- Last Synced: 2025-02-19T03:45:34.656Z (about 1 year ago)
- Topics: github-actions, github-actions-typescript
- Language: TypeScript
- Size: 19.5 MB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deploy Action
Deploys a helm chart to a Kubernetes cluster.
Install the dependencies
```bash
yarn install
```
Build the typescript
```bash
yarn build
```
Run the tests
```bash
yarn test
```
## Usage
Example of deployment with helm based on a Github deployment trigger, that pushes
releases to sentry and notifies Slack.
```yaml
on: ['deployment']
#...
jobs:
deploy:
name: deploy ${{ github.event.deployment.payload.app }} to ${{ github.event.deployment.environment }}
runs-on: ubuntu-latest
steps:
# ...
- name: Check chart
uses: minddocdev/deploy-action@master
with:
config: |
{
"app": "myApp",
"appUrl": "https://myApp.minddoc.com",
"chart": "myhelmrepo/myapp",
"namespace": "apps",
"release": "myapp",
"valueFiles": [
"myapp-values/values.yaml",
"myapp-values/values-staging.yaml"
],
"values": {
"image": {
"tag": ${{ github.sha }}
}
}
}
# Or you could specify the config in the deployment payload, like:
# config: ${{ github.event.deployment.payload }}
environment: ${{ github.event.deployment.environment }}
helmRepoName: myhelmrepo
helmRepoUrl: https://raw.githubusercontent.com/mycompany/myhelmrepo/master/helm/releases
helmRepoUsername: myhelmrepouser
helmRepoPassword: ${{ secrets.HELM_REPO_TOKEN }}
kubeConfig: |
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ${{ secrets.KUBE_CERT }}
server: ${{ secrets.KUBE_SERVER }}
name: myCluster
contexts:
- context:
cluster: myCluster
namespace: default
user: ci
name: myCluster
current-context: myCluster
kind: Config
preferences: {}
users:
- name: ci
user:
token: ${{ secrets.KUBE_USER_TOKEN }}
sentryAuthToken: ${{ secrets.SENTRY_AUTH_TOKEN }}
sentryOrg: mysentryorg
slackWebhook: ${{ secrets.SLACK_WEBHOOK }}
```