Skip to content

Commit 86b6237

Browse files
committed
[actions] fix unit test
1 parent 2bd34bd commit 86b6237

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/scripts/manual-bump.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
# Absolute path of repository
5+
repository=$(git rev-parse --show-toplevel)
6+
7+
for parent_dir in $(ls ${repository}/charts/stable/)
8+
do
9+
10+
version=$(grep "^version:" ${repository}/charts/**/${parent_dir}/Chart.yaml | awk '{print $2}')
11+
if [[ ! $version ]]; then
12+
echo "No valid version was found"
13+
exit 1
14+
fi
15+
16+
major=$(echo "$version" | cut -d. -f1)
17+
minor=$(echo "$version" | cut -d. -f2)
18+
patch=$(echo "$version" | cut -d. -f3)
19+
20+
minor=$(( minor + 1 ))
21+
patch=0
22+
23+
echo "Bumping version for $parent_dir from $version to $major.$minor.$patch"
24+
sed -i "s/^version:.*/version: ${major}.${minor}.${patch}/g" ${repository}/charts/**/${parent_dir}/Chart.yaml
25+
26+
done

.github/workflows/charts-test.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ jobs:
7171
7272
- name: Run tests
7373
run: |
74-
for repo in $(yq '.chart-repos' .github/ct-install.yaml); do
75-
helm repo add ${repo%*=} ${repo#*=}
74+
for repo in $(yq eval '.chart-repos.[]' .github/ct-install.yaml)
75+
do
76+
helm repo add ${repo%=*} ${repo#*=}
7677
done
7778
helm dependency update
7879
helm template ${{ matrix.chart }} --values ${{ matrix.chart }}/values.yaml > /dev/null

0 commit comments

Comments
 (0)