sync with upstream chart #50
This file contains hidden or 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: "Charts: Release" | |
| concurrency: helm-release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "charts/**" | |
| env: | |
| HELM_VERSION: 3.9.2 | |
| YQ_VERSION: 4.16.2 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| # token: ${{ steps.generate-token.outputs.token }} | |
| fetch-depth: 0 | |
| # - name: Install helm-docs | |
| # run: | | |
| # wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb | |
| # sudo dpkg -i /tmp/helm-docs.deb | |
| - name: Collect changes | |
| id: collect-changes | |
| uses: ./.github/actions/collect-changes | |
| # - name: Generate README for changed charts | |
| # if: | | |
| # steps.collect-changes.outputs.changesDetected == 'true' | |
| # run: | | |
| # CHARTS=(${{ steps.collect-changes.outputs.addedOrModifiedCharts }}) | |
| # for i in "${CHARTS[@]}" | |
| # do | |
| # IFS='/' read -r -a chart_parts <<< "$i" | |
| # if [ -f "charts/${chart_parts[0]}"/"${chart_parts[1]}/Chart.yaml" ]; then | |
| # ./.github/scripts/gen-helm-docs.sh "${chart_parts[0]}" "${chart_parts[1]}" | |
| # fi | |
| # done | |
| - name: Create commit | |
| id: create-commit | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| file_pattern: charts/** | |
| commit_message: "chore: Auto-update chart README [skip ci]" | |
| commit_user_name: geek-cookbook[bot] | |
| commit_user_email: geek-cookbook[bot]@users.noreply.github.com | |
| commit_author: geek-cookbook[bot] <geek-cookbook[bot]@users.noreply.github.com> | |
| - name: Save commit hash | |
| id: save-commit-hash | |
| run: | | |
| if [ "${{ steps.create-commit.outputs.changes_detected || 'unknown' }}" == "true" ]; then | |
| echo '::set-output name=commit_hash::${{ steps.create-commit.outputs.commit_hash }}' | |
| else | |
| echo "::set-output name=commit_hash::${GITHUB_SHA}" | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| # token: ${{ steps.generate-token.outputs.token }} | |
| ref: ${{ steps.save-commit-hash.outputs.commit_hash }} | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "geek-cookbook[bot]" | |
| git config user.email "geek-cookbook[bot]@users.noreply.github.com" | |
| - name: Run chart-releaser | |
| uses: helm/[email protected] | |
| with: | |
| charts_dir: charts/* | |
| charts_repo_url: https://geek-cookbook.github.io/charts/ | |
| env: | |
| CR_TOKEN: "${{ secrets.RENOVATE_TOKEN }}" | |
| CR_SKIP_EXISTING: "true" | |
| # generate-summary: | |
| # name: Auto-generate charts summary | |
| # runs-on: ubuntu-latest | |
| # container: funkypenguin/chart-tools # # necessary for running ARC with k8s jobs | |
| # needs: | |
| # - release | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v3 | |
| # with: | |
| # # token: ${{ steps.generate-token.outputs.token }} | |
| # ref: main | |
| # fetch-depth: 0 | |
| # - name: Run script | |
| # run: | | |
| # ./hack/gen-chart-summary.sh | |
| # - name: Create Commit | |
| # uses: stefanzweifel/git-auto-commit-action@v4 | |
| # with: | |
| # push_options: --force | |
| # commit_message: Auto-generate chart summary [no ci] | |
| # commit_user_name: geek-cookbook[bot] | |
| # commit_user_email: geek-cookbook[bot]@users.noreply.github.com | |
| # commit_author: geek-cookbook[bot] <geek-cookbook[bot]@users.noreply.github.com> | |
| # file_pattern: charts/README.md |