Skip to content

Commit 3bd53c2

Browse files
authored
Merge pull request #9 from bitovi/AddVersion
Added Version input
2 parents 5dea753 + 95776a7 commit 3bd53c2

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ Following inputs can be used as `step.with` keys
1717
| `aws-region` | String | AWS region to use. This must match the region your desired cluster lies in. |
1818
| `cluster-name` | String | The name of the desired cluster. |
1919
| `cluster-role-arn` | String | If you wish to assume an admin role, provide the role arn here to login as. |
20-
| `action` | String | Determines if we `install` or `uninstall` the chart. (Optional, Defaults to `install`)
20+
| `action` | String | Determines if we `install` or `uninstall` the chart. (Optional, Defaults to `install`) |
2121
| `config-files` | String | Comma separated list of helm values files. |
2222
| `namespace` | String | Kubernetes namespace to use. Will create if it does not exist |
2323
| `values` | String | Comma separated list of value set for helms. e.x:`key1=value1,key2=value2` |
2424
| `name` | String | The name of the helm release |
2525
| `chart-path` | String | The path to the chart. (defaults to `helm/`) |
2626
| `chart-repository` | String | The URL of the chart-repository (Optional) |
27+
| `version` | String | The version of the chart (Optional) |
2728
| `plugins` | String | Comma separated list of plugins to install. e.x:` https://github.com/hypnoglow/helm-s3.git, https://github.com/someuser/helm-plugin.git` (defaults to none) |
2829
| `timeout` | String | The value of the timeout for the helm release |
2930
| `update-deps` | String | Update chart dependencies |
@@ -33,7 +34,7 @@ Following inputs can be used as `step.with` keys
3334
## Example usage
3435

3536
```yaml
36-
uses: bitovi/github-actions-deploy-eks-helm@v1.0.4
37+
uses: bitovi/github-actions-deploy-eks-helm@v1.1.0
3738
with:
3839
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
3940
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -49,7 +50,7 @@ with:
4950
## Example 2
5051
```yaml
5152
- name: Deploy Helm
52-
uses: bitovi/github-actions-deploy-eks-helm@v1.0.4
53+
uses: bitovi/github-actions-deploy-eks-helm@v1.1.0
5354
with:
5455
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
5556
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -61,6 +62,7 @@ with:
6162
namespace: logging
6263
name: fluent-bit
6364
chart-repository: https://fluent.github.io/helm-charts
65+
version: 0.20.6
6466
atomic: true
6567
```
6668

action.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ inputs:
4444
chart-repository:
4545
description: 'The repository of the chart.'
4646
required: false
47+
version:
48+
description: 'The chart version'
49+
required: false
4750
timeout:
4851
description: 'Timeout for the job.'
4952
required: true
@@ -64,7 +67,7 @@ inputs:
6467

6568
runs:
6669
using: 'docker'
67-
image: 'docker://bitovi/deploy-eks-helm:v1.0.4'
70+
image: 'docker://bitovi/deploy-eks-helm:v1.1.0'
6871
env:
6972
AWS_REGION: ${{ inputs.aws-region }}
7073
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }}
@@ -83,3 +86,4 @@ runs:
8386
PLUGINS_LIST: ${{ inputs.plugins }}
8487
HELM_ATOMIC: ${{ inputs.atomic }}
8588
HELM_ACTION: ${{ inputs.action }}
89+
VERSION: ${{ inputs.version }}

deploy.sh

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ if [ "${HELM_ACTION}" == "install" ]; then
7676
HELM_COMMAND="${HELM_COMMAND} --set ${DEPLOY_VALUES}"
7777
fi
7878

79+
if [ -n "$VERSION" ]; then
80+
HELM_COMMAND="${HELM_COMMAND} --version ${VERSION}"
81+
fi
82+
7983
elif [ "${HELM_ACTION}" == "uninstall" ]; then
8084
HELM_COMMAND="helm uninstall --timeout ${TIMEOUT}"
8185

0 commit comments

Comments
 (0)