-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from FusionAuth/jj/chart-version-vars
use placeholder vars in chart files
- Loading branch information
Showing
5 changed files
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ on: | |
push: | ||
tags: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
|
@@ -17,20 +16,23 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: update FusionAuth app version in misc files | ||
- name: update placeholder versions | ||
working-directory: ./chart | ||
run: | | ||
apk add -q curl jq | ||
APP_VERSION=$(curl -s https://account.fusionauth.io/api/version | jq -r '.versions[]' | sort -V | tail -n 1) | ||
apk add -q curl jq envsubst | ||
echo "Chart: ${GITHUB_REF##*/}" | ||
export APP_VERSION=$(curl -s https://account.fusionauth.io/api/version | jq -r '.versions[]' | sort -V | tail -n 1) | ||
export CHART_VERSION="${GITHUB_REF##*/}" | ||
echo "Chart: $CHART_VERSION" | ||
echo "App: $APP_VERSION" | ||
sed -i 's/\(version: \).*/\1'"${GITHUB_REF##*/}"'/' Chart.yaml | ||
sed -i 's/\(appVersion: \).*/\1'"$APP_VERSION"'/' Chart.yaml | ||
sed -i 's/\(^ tag: \).*/\1'"$APP_VERSION"'/' values.yaml | ||
sed -i 's/\(^ tag: \).*/\1'"$APP_VERSION"'/' examples/minikube/values.yaml | ||
sed -i '/| image.tag/s/\"\([^]]*\)\"/\"'"$APP_VERSION"'\"/' README.md | ||
for file in Chart.yaml values.yaml README.md examples/minikube/values.yaml | ||
do | ||
tmpfile=$(mktemp) | ||
cat "$file" > "$tmpfile" | ||
envsubst < "$tmpfile" > "$file" | ||
done | ||
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | ||
|
@@ -40,11 +42,6 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global --add safe.directory /__w/charts/charts | ||
- name: commit app version | ||
run: | | ||
git commit -am "Update FusionAuth app version in chart to ${{ env.APP_VERSION }}" | ||
git push | ||
- name: Release | ||
id: release | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters