17
17
uses : actions/checkout@v2
18
18
- uses : actions/setup-go@v2
19
19
with :
20
- go-version : ' 1.17'
20
+ go-version : " 1.17"
21
21
- name : Setup dependencies
22
22
uses : ./.github/actions/deps-setup
23
23
@@ -68,27 +68,31 @@ jobs:
68
68
id : changed_charts
69
69
env :
70
70
FILTER_OUTPUT : ${{ toJson(steps.filter.outputs) }}
71
- FORCE_FULL_RUN : ${{ github.ref_type == 'tag' || steps.filter.outputs['ci-definitions'] == 'true' }}
71
+ FORCE_FULL_RUN :
72
+ ${{ github.ref_type == 'tag' ||
73
+ steps.filter.outputs['ci-definitions'] == 'true' }}
72
74
run : |
73
- updated_charts=$(echo "$FILTER_OUTPUT" | jq -r 'to_entries | map(select((.key | endswith("-helm")) and .value == "true")) | map(.key)')
74
- updated_charts=$(echo "$updated_charts" | sed "s/-helm//g")
75
-
76
- echo "ForceFullRun: ${FORCE_FULL_RUN}"
77
- if [[ "$FORCE_FULL_RUN" == "true" ]]; then
78
- echo "Forcing tests to be running on every charts as CI running in release context"
79
- updated_charts=$(ls ${{ github.workspace }}/helm/charts/ | tr -d " " | jq --raw-input --slurp 'split("\n") | map(select(. != ""))')
80
- fi
75
+ updated_charts=$(echo "$FILTER_OUTPUT" | jq -r 'to_entries | map(select((.key | endswith("-helm")) and .value == "true")) | map(.key)')
76
+ updated_charts=$(echo "$updated_charts" | sed "s/-helm//g")
77
+
78
+ echo "ForceFullRun: ${FORCE_FULL_RUN}"
79
+ if [[ "$FORCE_FULL_RUN" == "true" ]]; then
80
+ echo "Forcing tests to be running on every charts as CI running in release context"
81
+ updated_charts=$(ls ${{ github.workspace }}/helm/charts/ | tr -d " " | jq --raw-input --slurp 'split("\n") | map(select(. != ""))')
82
+ fi
83
+
84
+ if [[ "$updated_charts" == "[]" ]]; then
85
+ echo ::set-output name=no_changes::"true"
86
+ fi
87
+ echo ::set-output name=matrix::{\"chart\":$(echo $updated_charts)}\"
88
+
89
+ echo "Charts array to run CI on: $updated_charts"
81
90
82
- if [[ "$updated_charts" == "[]" ]]; then
83
- echo ::set-output name=no_changes::"true"
84
- fi
85
- echo ::set-output name=matrix::{\"chart\":$(echo $updated_charts)}\"
86
-
87
- echo "Charts array to run CI on: $updated_charts"
88
-
89
91
check :
90
92
name : Check Helm Chart '${{ matrix.chart }}'
91
- if : ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref != 'ref/heads/master' }}
93
+ if :
94
+ ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref
95
+ != 'ref/heads/master' }}
92
96
needs : [dependencies, detect-repo-changes]
93
97
runs-on : ubuntu-22.04
94
98
env :
@@ -99,17 +103,18 @@ jobs:
99
103
uses : actions/checkout@v2
100
104
- name : Checkout dependencies
101
105
uses : ./.github/actions/deps-setup
102
- - name : Lint helm chart
106
+ - name : Lint helm chart
103
107
run : make helm-lint
104
- - name : Validate helm chart
108
+ - name : Validate helm chart
105
109
run : make helm-validate
106
110
strategy :
107
111
matrix : ${{ fromJson(needs.detect-repo-changes.outputs.helms-changed) }}
108
112
109
-
110
113
test-upgrade :
111
114
name : Upgrade Helm Chart '${{ matrix.chart }}'
112
- if : ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref != 'ref/heads/master' }}
115
+ if :
116
+ ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref
117
+ != 'ref/heads/master' }}
113
118
needs : [check, detect-repo-changes, dependencies]
114
119
runs-on : ubuntu-22.04
115
120
env :
@@ -120,14 +125,16 @@ jobs:
120
125
uses : actions/checkout@v2
121
126
- name : Checkout dependencies
122
127
uses : ./.github/actions/deps-setup
123
- - name : Test upgrade for helm chart
128
+ - name : Test upgrade for helm chart
124
129
run : make helm-upgrade
125
130
strategy :
126
131
matrix : ${{ fromJson(needs.detect-repo-changes.outputs.helms-changed) }}
127
-
132
+
128
133
test-install :
129
134
name : Install Helm Chart '${{ matrix.chart }}'
130
- if : ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref != 'ref/heads/master' }}
135
+ if :
136
+ ${{ needs.detect-repo-changes.outputs.no-changes != 'true' && github.ref
137
+ != 'ref/heads/master' }}
131
138
needs : [check, detect-repo-changes, dependencies]
132
139
runs-on : ubuntu-22.04
133
140
env :
@@ -138,7 +145,7 @@ jobs:
138
145
uses : actions/checkout@v2
139
146
- name : Checkout dependencies
140
147
uses : ./.github/actions/deps-setup
141
- - name : Test install for helm chart
148
+ - name : Test install for helm chart
142
149
run : make helm-test
143
150
strategy :
144
151
matrix : ${{ fromJson(needs.detect-repo-changes.outputs.helms-changed) }}
@@ -152,21 +159,21 @@ jobs:
152
159
steps :
153
160
- name : Checkout
154
161
uses : actions/checkout@v2
155
- - name : Generate documentation
162
+ - name : Generate documentation
156
163
run : |
157
- pushd .bin
158
- curl -L https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz -o helm-docs.tar.gz
159
- tar -xvf helm-docs.tar.gz
160
- ./helm-docs -c ../helm/charts
161
- popd
162
- - name : Push commit for release
164
+ pushd .bin
165
+ curl -L https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz -o helm-docs.tar.gz
166
+ tar -xvf helm-docs.tar.gz
167
+ ./helm-docs -c ../helm/charts
168
+ popd
169
+ - name : Push commit for release
163
170
run : |
164
171
git config --global user.email "60093411+ory-bot@users.noreply.github.com"
165
172
git config --global user.name "ory-bot"
166
173
git checkout -b make-release HEAD
167
174
git add -A
168
175
git commit -m "Regenerate helm docs
169
-
176
+
170
177
[skip ci]" || echo "No changes to commit"
171
178
172
179
git push origin HEAD:master
@@ -183,14 +190,14 @@ jobs:
183
190
run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
184
191
- name : Release helm charts
185
192
run : make release
186
- - name : Push commit for release
193
+ - name : Push commit for release
187
194
run : |
188
195
git config --global user.email "60093411+ory-bot@users.noreply.github.com"
189
196
git config --global user.name "ory-bot"
190
197
git checkout -b make-release HEAD
191
198
git add -A
192
199
git commit -a -m "Release ${RELEASE_VERSION}
193
-
200
+
194
201
[skip ci]" || echo "No changes to commit"
195
202
196
203
git push origin HEAD:master
0 commit comments