Release Charts #367
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: 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 devbox | |
uses: jetify-com/[email protected] | |
with: | |
enable-cache: true | |
- name: Run helm-docs | |
run: devbox run helm-docs | |
kubeconform-chart: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
k8s: | |
- v1.28.11 | |
- v1.29.6 | |
- v1.30.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install devbox | |
uses: jetify-com/[email protected] | |
with: | |
enable-cache: true | |
- name: Run kubeconform | |
env: | |
KUBERNETES_VERSION: ${{ matrix.k8s }} | |
run: devbox run kubeconform | |
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 "[email protected]" | |
- 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/[email protected] | |
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 |