Skip to content

add cosmoshub chart

add cosmoshub chart #1

Workflow file for this run

name: Deploy Helm Chart to gh-pages
on:
push:
branches:
- main # Trigger on pushes to the main branch
paths:
- "**/Chart.yaml" # Trigger only if a Chart.yaml file is added or updated
- "**/values.yaml"
- "**/templates/**"
jobs:
deploy-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout Main Branch
uses: actions/checkout@v3
- name: Install Helm
run: |
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Identify Changed Charts
id: find-charts
run: |
# Find directories with changes
CHANGED_CHARTS=$(git diff --name-only HEAD^ HEAD | grep -oE '^.+/Chart.yaml' | xargs -n1 dirname | sort -u)
echo "changed_charts=$CHANGED_CHARTS" >> $GITHUB_ENV
- name: Package Modified Helm Charts
if: env.changed_charts != ""

Check failure on line 32 in .github/workflows/update-index.yaml

View workflow run for this annotation

GitHub Actions / Deploy Helm Chart to gh-pages

Invalid workflow file

The workflow is not valid. .github/workflows/update-index.yaml (Line: 32, Col: 11): Unexpected symbol: '""'. Located at position 23 within expression: env.changed_charts != "" .github/workflows/update-index.yaml (Line: 45, Col: 11): Unexpected symbol: '""'. Located at position 23 within expression: env.changed_charts != ""
run: |
mkdir -p packaged-charts
for chart in $changed_charts; do
helm package $chart --destination packaged-charts
done
- name: Checkout gh-pages Branch
uses: actions/checkout@v3
with:
ref: gh-pages # Check out the gh-pages branch
- name: Copy Packaged Charts
if: env.changed_charts != ""
run: |
mkdir -p charts
mv ../packaged-charts/*.tgz charts/
- name: Update Helm Repo Index
if: env.changed_charts != ""
run: |
helm repo index charts --url https://nodeify-eth.github.io/helm-charts/charts/
- name: Commit and Push Changes
if: env.changed_charts != ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add charts
git commit -m "Update Helm chart(s) and index"
git push