Skip to content

chore(ci): add k8s v1.24.15, v1.26.6, v1.27.3 #142

chore(ci): add k8s v1.24.15, v1.26.6, v1.27.3

chore(ci): add k8s v1.24.15, v1.26.6, v1.27.3 #142

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/checkout@v4.1.1
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.4.0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- 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: |
DIST_DIR=.dist
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
TARGET_BRANCH=gh-pages
REMOTE_REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git config --local user.email "duyetbot@users.noreply.github.com"
git config --local user.name "Auto Release Bot"
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