Update actions/checkout action to v4.1.6 (#165) #156
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: 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: | | |
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 "[email protected]" | |
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 |