Skip to content

Commit 101f572

Browse files
updated chart version logic
1 parent 65098b9 commit 101f572

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Deploys
22

3-
on:
4-
push:
5-
branches:
6-
- trunk
3+
on: workflow_dispatch
74

85
jobs:
96
deploy:
@@ -100,11 +97,10 @@ jobs:
10097
- name: Make changes for helm chart
10198
run: |
10299
IMAGE_VERSION=${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
103-
CURRENT_CHART_VERSION=$(sed "5q;d" charts/selenium-grid/CHANGELOG.md | tr ":" "\n" | awk 'FNR == 3{print}' | xargs)
104-
CHART_VERSION=$(echo ${CURRENT_CHART_VERSION} | awk -F. -v OFS=. '{$NF += 1 ; print}')
105100
106101
cd charts/selenium-grid
107-
102+
CURRENT_CHART_VERSION=$(yq -r .version Chart.yaml)
103+
CHART_VERSION=$(echo ${CURRENT_CHART_VERSION} | awk -F. -v OFS=. '{$NF += 1 ; print}')
108104
awk -v CHART_VERSION="$CHART_VERSION" -v IMAGE_VERSION="$IMAGE_VERSION" \
109105
'NR==5{print "## :heavy_check_mark: " CHART_VERSION "\n\n### Changed\n- Update image tag to " IMAGE_VERSION "\n"}1' CHANGELOG.md > awk_out && mv awk_out CHANGELOG.md
110106
awk -v IMAGE_VERSION="$IMAGE_VERSION" '{gsub(/appVersion:.*/,"appVersion: " IMAGE_VERSION);}1' Chart.yaml > awk_out && mv awk_out Chart.yaml

charts/selenium-grid/Chart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: v2
23
name: selenium-grid
34
description: A Helm chart for creating a Selenium Grid Server in Kubernetes

0 commit comments

Comments
 (0)