Skip to content

Commit b883257

Browse files
author
Rub21
committed
Add appVersion for charts
1 parent 43aa663 commit b883257

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/chartpress.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
run: git config --global user.email "[email protected]" && git config --global user.name "Github Action"
1919
- name: Install Chartpress and some python modules
2020
run: |
21-
pip install -v chartpress && pip install six && pip install jq
21+
pip install -v chartpress && pip install six && pip install yq
2222
- name: Set env vars for publish charts
2323
run: |
2424
GIT_BRANCH_NAME=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
2525
GIT_BRANCH_NAME=${GIT_BRANCH_NAME/\//_}
26-
OSM_SEED_VERSION=$(jq -r '.version' < package.json)
26+
OSM_SEED_VERSION=$(yq -r .appVersion ./osm-seed/Chart.yaml)
2727
SHORT_GITHUB_SHA=${GITHUB_SHA::7}
2828
echo "GIT_BRANCH_NAME=$GIT_BRANCH_NAME" >> $GITHUB_ENV
2929
echo "OSM_SEED_VERSION=$OSM_SEED_VERSION" >> $GITHUB_ENV
@@ -33,13 +33,12 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
3434
GITHUB_EVENT_NAME: ${{ github.event_name }}
3535
run: |
36-
if [[ $GIT_BRANCH_NAME = "versioning" ]]
36+
if [[ $GIT_BRANCH_NAME = "main" ]]
3737
then
38-
echo chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}
38+
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}
3939
elif [[ $GIT_BRANCH_NAME = "develop" ]]
4040
then
41-
TAG=dev
42-
echo chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}-$TAG.h$SHORT_GITHUB_SHA
41+
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}-dev.h$SHORT_GITHUB_SHA
4342
else
44-
echo chartpress --push --publish-chart
43+
chartpress --push --publish-chart
4544
fi

osm-seed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
22
description: "Helm Chart to deploy the OpenStreetMap software"
33
name: osm-seed
4+
appVersion: 1.0.0
45
version: ''
5-

0 commit comments

Comments
 (0)