-
Notifications
You must be signed in to change notification settings - Fork 0
Adjust Github Actions to use Helm deployment #2
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
Changes from all commits
af00e43
0827669
91f1d9f
e4f9ff5
c192ec3
d9e298a
d6ca342
9f49122
dc19b57
81f520b
20c8091
55f1434
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: 'Deploy Helm chart to Kubernetes' | ||
| description: 'Deploy an application to a Kubernetes cluster using its Helm chart' | ||
|
|
||
| inputs: | ||
| release-name: | ||
| description: 'The name of the Helm release' | ||
| required: true | ||
| chart-path: | ||
| description: 'The directory of the Helm chart' | ||
| default: '.' | ||
| values-file: | ||
| description: 'Path to the Helm values file' | ||
| required: true | ||
| image-tag: | ||
| description: 'Tag of the container image' | ||
| default: 'latest' | ||
| timeout: | ||
| description: 'Timeout for the Helm command' | ||
| default: '5m' | ||
| working-directory: | ||
| description: 'The working directory' | ||
| default: '.' | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Deploy Helm Chart | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: | | ||
| helm upgrade --wait --install ${{ inputs.release-name }} ${{ inputs.chart-path }} \ | ||
| --values ${{ inputs.values-file }} \ | ||
| --atomic --timeout ${{ inputs.timeout }} \ | ||
| --set image.tag=${{ inputs.image-tag }} |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I increace the verison, then I adjust also always in the readme under the section |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ Setup Digital-Ocean CLI and configure Kubernetes. | |
| #### Example | ||
|
|
||
| ```yaml | ||
| - uses: aboutbits/github-actions-kubernetes/do-setup-kubectl@v1 | ||
| - uses: aboutbits/github-actions-kubernetes/do-setup-kubectl@v2 | ||
| with: | ||
| digital-ocean-token: ${{ secrets.DIGITALOCEAN_TOKEN }} | ||
| cluster-name: ${{ env.CLUSTER_NAME }} | ||
|
|
@@ -27,14 +27,14 @@ The following inputs can be used as `step.with` keys: | |
| | `cluster-name` | required | Kubernetes cluster name | | ||
|
|
||
|
|
||
| ### Deploy to Kubernetes | ||
| ### Deploy to Kubernetes using kubectl | ||
|
|
||
| Deploy application to a Kubernetes Cluster. Requires Kubernetes to be configured first. | ||
|
|
||
| #### Example | ||
|
|
||
| ```yaml | ||
| - uses: aboutbits/github-actions-kubernetes/deploy@v1 | ||
| - uses: aboutbits/github-actions-kubernetes/kubectl-deploy@v2 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please adjust also the title: |
||
| with: | ||
| deployment-file: 'infrastructure/kubernetes.prod.yml' | ||
| namespace-name: ${{ env.NAMESPACE_NAME }} | ||
|
|
@@ -52,6 +52,35 @@ The following inputs can be used as `step.with` keys: | |
| | `deployment-name` | required | Kubernetes deployment name | | ||
| | `working-directory` | `.` | The working directory | | ||
|
|
||
| ### Deploy to Kubernetes using Helm | ||
|
|
||
| Deploy an application to a Kubernetes cluster using its Helm diagram. Requires Kubernetes to be configured first. | ||
|
|
||
| #### Example | ||
|
|
||
| ```yaml | ||
| - uses: aboutbits/github-actions-kubernetes/helm-deploy@v2 | ||
| with: | ||
| release-name: my-app | ||
| chart-directory: my-chart | ||
| image-tag: "1.0.0" | ||
| values-file: environments/values-test.yaml | ||
| timeout: 5m | ||
| working-directory: ./infrastructure | ||
| ``` | ||
|
|
||
| #### Inputs | ||
|
|
||
| The following inputs can be used as `step.with` keys: | ||
|
|
||
| | Name | Required/Default | Description | | ||
| |---------------------|------------------|------------------------------------| | ||
| | `release-name` | required | The name of the Helm release | | ||
| | `values-file` | required | Path to the Helm values file | | ||
| | `working-directory` | `.` | The working directory | | ||
| | `chart-directory` | `.` | Root directory of the helm diagram | | ||
| | `image-tag` | `latest` | Tag of the container image | | ||
| | `timeout` | `5m` | Timeout for the Helm command | | ||
|
|
||
| ## Versioning | ||
|
|
||
|
|
@@ -60,16 +89,16 @@ In order to have a versioning in place and working, create lightweight tags that | |
| Creating a new minor release: | ||
|
|
||
| ```bash | ||
| git tag v1 | ||
| git tag v2 | ||
| git push --tags | ||
| ``` | ||
|
|
||
| Replacing an already existing minor release: | ||
|
|
||
| ```bash | ||
| git tag -d v1 | ||
| git push origin :refs/tags/v1 | ||
| git tag v1 | ||
| git tag -d v2 | ||
| git push origin :refs/tags/v2 | ||
| git tag v2 | ||
| git push --tags | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about renaming
aboutbits/github-actions-kubernetes/deploytoaboutbits/github-actions-kubernetes/kubectl-deploy? We could just simply release everything with version 2 then it should not be a problem and we have it more evident for the future?