Skip to content

fix(clickhouse-monitoring): fix release (#178) #165

fix(clickhouse-monitoring): fix release (#178)

fix(clickhouse-monitoring): fix release (#178) #165

name: Chart build and publish
on:
push:
branches:
- master
- fix/auto-release
jobs:
chart-lint-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.4.0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
- name: Helm build packages
run: sudo ./build.sh
- name: Commit files
run: |
set -x
export DIST_DIR=.dist
export CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
export TARGET_BRANCH=gh-pages
export REMOTE_REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git config --local user.email "[email protected]"
git config --local user.name "Auto Release Bot"
git checkout $TARGET_BRANCH
git status
git add $DIST_DIR
git commit -m "[skip ci] Build and Publish Charts"
git push $REMOTE_REPO $CURRENT_BRANCH
git subtree split --prefix $DIST_DIR -b $TARGET_BRANCH
git push -f ${REMOTE_REPO} $TARGET_BRANCH:$TARGET_BRANCH