File tree 3 files changed +30
-3
lines changed
3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Following inputs can be used as `step.with` keys
48
48
| ` pass-credentials ` | String | Pass credentials to all domains. set (Optional) |
49
49
| ` username ` | String | Chart repository username where to locate the requested chart. |
50
50
| ` password ` | String | Chart repository password where to locate the requested chart. |
51
+ | ` use-secrets-vals ` | Boolean | Use secrets plugin using vals to evaluate the secrets |
51
52
52
53
## Example 1 - local repo chart
53
54
@@ -118,6 +119,24 @@ Following inputs can be used as `step.with` keys
118
119
... (put your other arguments here)
119
120
```
120
121
122
+ ## Example 5 - Use secrets with vals backend
123
+ ``` yaml
124
+ - name : Deploy Helm
125
+
126
+ with :
127
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
128
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
129
+ aws-region : us-west-2
130
+ cluster-name : mycluster
131
+ config-files : .github/values/dev.yaml
132
+ chart-path : chart/
133
+ namespace : dev
134
+ values : key1=value1,key2=value2
135
+ name : release_name
136
+ use-secrets-vals : true
137
+ plugins : https://github.com/jkroepke/helm-secrets
138
+ ` ` `
139
+
121
140
## Example Uninstall
122
141
123
142
` ` ` yaml
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ inputs:
89
89
username :
90
90
description : ' Chart repository username where to locate the requested chart.'
91
91
required : false
92
-
92
+ use-secrets-vals :
93
+ description : ' Uses the secrets with vals backend to apply the chart'
94
+ required : false
93
95
runs :
94
96
using : ' docker'
95
97
image : ' Dockerfile'
@@ -120,3 +122,4 @@ runs:
120
122
REPO_USERNAME : ${{ inputs.username }}
121
123
REPO_PASSWORD : ${{ inputs.password }}
122
124
VERSION : ${{ inputs.version }}
125
+ USE_SECRETS_VALS : ${{ inputs.use-secrets-vals }}
Original file line number Diff line number Diff line change 124
124
# Proceed with installation procedure
125
125
126
126
if [ " ${HELM_ACTION} " == " install" ]; then
127
- # Upgrade or install the chart. This does it all.
128
- HELM_COMMAND=" helm upgrade --install --create-namespace --timeout ${TIMEOUT} ${HELM_AUTH} "
127
+
128
+ if [ -n " ${USE_SECRETS_VALS} " ]; then
129
+ HELM_COMMAND=" helm secrets --backend vals --evaluate-templates true upgrade --install --create-namespace --timeout ${TIMEOUT} ${HELM_AUTH} "
130
+ else
131
+ # Upgrade or install the chart. This does it all.
132
+ HELM_COMMAND=" helm upgrade --install --create-namespace --timeout ${TIMEOUT} ${HELM_AUTH} "
133
+ fi
129
134
130
135
# If we should wait, then do so
131
136
if [ -n " ${HELM_WAIT} " ]; then
You can’t perform that action at this time.
0 commit comments