Release Charts #536
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: Release Charts | |
| on: | |
| push: | |
| paths: | |
| - 'charts/**' | |
| - '.github/**' | |
| pull_request: | |
| paths: | |
| - 'charts/**' | |
| - '.github/**' | |
| workflow_dispatch: | |
| jobs: | |
| lint-chart: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| - name: Add helm repos | |
| run: .github/add-repos.sh | |
| - name: Run chart-testing (lint) | |
| uses: helm/chart-testing-action@main | |
| with: | |
| command: lint | |
| config: .github/ct.yaml | |
| lint-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Run helm-docs | |
| run: mise exec -- ./.github/helm-docs.sh | |
| kubeconform-chart: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| k8s: | |
| - v1.31.0 | |
| - v1.32.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v1 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Run kubeconform | |
| env: | |
| KUBERNETES_VERSION: ${{ matrix.k8s }} | |
| run: mise exec -- ./.github/kubeconform.sh | |
| release: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
| permissions: | |
| contents: write | |
| needs: | |
| - lint-chart | |
| - lint-docs | |
| - kubeconform-chart | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Add helm repos | |
| run: .github/add-repos.sh | |
| - name: Login helm into container registries | |
| run: helm registry login -u ${{ github.repository_owner }} -p ${{ secrets.CR_PAT }} ghcr.io | |
| - name: Run chart-releaser | |
| uses: helm/chart-releaser-action@v1.7.0 | |
| with: | |
| skip_existing: true | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Publish charts to OCI | |
| run: for f in ./.cr-release-packages/*; do helm push $f oci://ghcr.io/restorecommerce/charts; done |