🔀 :: helm build #30
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
## Reference: https://github.com/helm/chart-releaser-action | |
name: Chart Publish | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "helm/**" | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Install Helm | |
uses: azure/[email protected] | |
with: | |
version: v3.10.1 # Also update in lint-and-test.yaml | |
- name: Helm package | |
id: helm_package | |
run: | | |
find helm -mindepth 1 -maxdepth 1 -type d | | |
while IFS= read -r package_directory; do | |
package_name=$(basename "$package_directory") | |
cd helm/$package_name | |
helm dependency update . | |
helm dependency build . | |
cd ../../ | |
done | |
helm package $(find helm -type d -mindepth 1 -maxdepth 1 -exec basename {} \; | tr '\n' ' ') | |
package_list=$(find . -type f -mindepth 1 -maxdepth 1 -name "*.tgz" -exec basename {} \; | tr '\n' ' ') | |
echo "package_list=$package_list" >> $GITHUB_OUTPUT | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
- name: Get *.tgz files | |
run: | | |
git checkout main -- ${{ steps.helm_package.outputs.package_list }} | |
- name: Commit The Chart Realease | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "update :: new realease" | |
branch: gh-pages | |
commit_options: '--no-verify --signoff' | |
repository: . | |
commit_user_name: XQUARE GitOps Bot | |
commit_user_email: [email protected] | |
commit_author: XQUARE GitOps Bot <[email protected]> |