fix(rbac): RBAC api group fixes (#38) #23
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: Publish Chart | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'helm/**' | |
jobs: | |
lint-chart: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Helm | |
uses: azure/setup-helm@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.0' | |
check-latest: true | |
- name: Run chart-testing (lint) | |
uses: helm/chart-testing-action@main | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.ref_name }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Run chart-testing (lint) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --target-branch ${{ github.ref_name }} | |
- name: Create kind cluster | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: helm/kind-action@v1.8.0 | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --target-branch ${{ github.ref_name }} | |
release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: | |
- lint-chart | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
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: Copy CRDs to it's chart | |
run: | | |
cp -rf config/crd/bases/* helm/osko-crds/charts/crds/templates/ | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@v1.6.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
charts_dir: helm | |
skip_existing: false | |
packages_with_index: true |