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 fbb883c5..db387a75 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