Skip to content

publish: try to fix branch name #216

publish: try to fix branch name

publish: try to fix branch name #216

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
- name: Install cm-push plugin
run: |
helm plugin install https://github.com/chartmuseum/helm-push.git
- name: Add helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add gitea-charts https://dl.gitea.io/charts
helm repo add requarks https://charts.js.wiki
helm repo add gitlab https://charts.gitlab.io
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm repo add emporium-apps ${{ vars.HELM_REPO }} --username ${{ vars.HELM_USER }} --password ${{ secrets.HELM_PASSWORD }}
helm repo add nextcloud https://nextcloud.github.io/helm/
- name: Run cm-push
run: |
changed_charts=()
last_push_sha=$(git rev-parse "$GITHUB_REF")
for dir in charts/*; do
if [ -d "$dir" ] && git diff --quiet $last_push_sha HEAD -- "$dir"; then
continue
fi
changed_charts+=("$dir")
done
for chart in "${changed_charts[@]}"; do
echo "Changed chart detected: $chart"
echo "Linting..."
helm lint $chart
echo "Pushing..."
# Package and push the chart
helm cm-push $chart emporium-apps
done