update wallet ui (#325) #20
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
name: Deploy Helm Charts | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
jobs: | |
package-and-publish: | |
name: Package and Publish Helm Charts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
helm version | |
- name: Check for changes in Helm Charts | |
id: check-changes | |
uses: tj-actions/changed-files@v42 | |
- name: Detect modified charts | |
id: changes | |
shell: bash | |
run: | | |
for file in ${{ steps.check-changes.outputs.all_changed_and_modified_files }}; do | |
baseFolder=$(cut -d'/' -f1 <<< "$file") | |
if [ $baseFolder = "charts" ]; then | |
echo "changed=true" >> "$GITHUB_ENV" | |
break; | |
fi | |
done | |
- name: Build Helm Chart Dependencies | |
if: env.changed == 'true' | |
run: | | |
helm repo add in2workspace https://in2workspace.github.io/helm-charts | |
helm repo update | |
CHARTS=$(find charts -mindepth 1 -maxdepth 1 -type d -printf "%f\n") | |
for CHART in $CHARTS; do | |
if [ -d "charts/$CHART" ]; then | |
echo "📦 Building dependencies for $CHART" | |
helm dependency build "charts/$CHART" | |
fi | |
done | |
- name: Validate Helm Charts | |
if: env.changed == 'true' | |
run: | | |
CHARTS=$(find charts -mindepth 1 -maxdepth 1 -type d -printf "%f\n") | |
for CHART in $CHARTS; do | |
if [ -d "charts/$CHART" ]; then | |
helm lint "charts/$CHART" | |
helm template "charts/$CHART" > /dev/null | |
fi | |
done | |
- name: Generate Helm Chart Version | |
id: generate-version | |
uses: zwaldowski/semver-release-action@v3 | |
with: | |
bump: patch | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure Git User | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Publish Helm Charts | |
if: env.changed == 'true' | |
uses: helm/chart-releaser-action@v1.6.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_SKIP_EXISTING: true | |
with: | |
pages_branch: gh-pages | |
- name: Create GitHub Release | |
if: env.changed == 'true' | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: ${{ steps.generate-version.outputs.version }} | |
prerelease: false | |
title: ${{ steps.generate-version.outputs.version }} |