From 89d209a81b7012ce69b02304b0a107c6322c614b Mon Sep 17 00:00:00 2001 From: "Jian Yu Sun (oscar)" Date: Sat, 27 Jan 2024 17:37:58 +0800 Subject: [PATCH] fix(ci): app version update --- .github/workflows/Chart.yaml.template | 2 +- .github/workflows/update-value.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Chart.yaml.template b/.github/workflows/Chart.yaml.template index ed0a2e90..ac153d43 100644 --- a/.github/workflows/Chart.yaml.template +++ b/.github/workflows/Chart.yaml.template @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.0.0 +version: $app_version # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/.github/workflows/update-value.yml b/.github/workflows/update-value.yml index 235b5557..40897159 100644 --- a/.github/workflows/update-value.yml +++ b/.github/workflows/update-value.yml @@ -35,8 +35,7 @@ jobs: export poster="${{ fromJson(github.event.inputs.version).poster }}" export cronjob="${{ fromJson(github.event.inputs.version).cronjob }}" export date=$(date +%y%m%d) - version="$(cat charts/agh2/Chart.yaml | grep -e '^version:' | awk '{print $2}')" - sed -i "s/$version/$(semver bump patch $version)/g" .github/workflows/Chart.yaml.template + export app_version="$(cat charts/agh2/Chart.yaml | grep -e '^version:' | awk '{print $2}' | xargs semver bump patch)" envsubst < .github/workflows/values.template > "charts/agh2/values.yaml" envsubst < .github/workflows/Chart.yaml.template > "charts/agh2/Chart.yaml" cat charts/agh2/values.yaml