forked from eclipse-tractusx/managed-identity-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f40a276
commit c2bd166
Showing
2 changed files
with
30 additions
and
7 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 |
---|---|---|
|
@@ -204,10 +204,33 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Run chart-releaser | ||
- name: Extract new app version from Chart.yaml | ||
run: | | ||
chart_yaml_path="./charts/managed-identity-wallet/Chart.yaml" | ||
# Use grep to find the line containing appVersion, awk to split by ":" and cut to remove leading/trailing spaces | ||
app_version=$(grep 'appVersion:' "$chart_yaml_path" | awk -F: '{gsub(/^[ \t]+|[ \t]+$/,"", $2); print $2}') | ||
echo "RELEASE_VERSION=$app_version" >> $GITHUB_ENV | ||
|
||
- name: Release chart | ||
if: github.event_name != 'pull_request' | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
packages_with_index: true | ||
run: | | ||
# Package MIW chart | ||
helm package -u -d helm-charts ./charts/managed-identity-wallet | ||
# Commit and push to gh-pages | ||
git add helm-charts | ||
git stash -- helm-charts | ||
git reset --hard | ||
git fetch origin | ||
git checkout gh-pages | ||
git stash pop | ||
# Generate helm repo index.yaml | ||
helm repo index . --merge index.yaml --url https://${GITHUB_REPOSITORY_OWNER}.github.io/${GITHUB_REPOSITORY#*/}/ | ||
git add index.yaml | ||
git commit -s -m "Release ${{ env.RELEASE_VERSION }}" | ||
git push origin gh-pages |
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