Update charts with latest bitnami mongodb image (#44) #216
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
| # title: Continuous Integration | |
| # uses: | |
| # - https://github.com/helm/chart-testing-action | |
| # - https://github.com/stackrox/kube-linter-action | |
| name: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: "ci" | |
| cancel-in-progress: true | |
| env: | |
| CHARTS_DIRECTORIES_ARG: "--chart-dirs charts" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout git repository | |
| uses: actions/checkout@v6 | |
| with: | |
| # note: important to have chart-testing work (see https://github.com/helm/chart-testing/issues/186) | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install Node.js dependencies | |
| run: npm install | |
| - name: Build with VitePress | |
| run: npm run docs:build | |
| - name: Install Helm | |
| uses: azure/[email protected] | |
| with: | |
| version: latest | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| check-latest: true | |
| - name: Use KubeLinter | |
| id: kube-lint-scan | |
| uses: stackrox/kube-linter-action@v1 | |
| with: | |
| directory: charts | |
| config: .kube-linter.yaml | |
| - name: Set up chart-testing | |
| uses: helm/[email protected] | |
| - name: Add dependency chart repositories | |
| run: ./scripts/add_helm_repo.sh | |
| - name: List changed charts | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed ${CHARTS_DIRECTORIES_ARG} --target-branch ${{ github.event.repository.default_branch }}) | |
| charts=$(echo "$changed" | tr '\n' ' ' | xargs) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| echo "changed_charts=$charts" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Lint charts | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct lint $CHARTS_DIRECTORIES_ARG --target-branch ${{ github.event.repository.default_branch }} | |
| # TODO: Enable when https://github.com/stackrox/kube-linter/issues/575 is fixed | |
| # - name: Scan yamls | |
| # id: kube-lint-scan | |
| # uses: stackrox/kube-linter-action@v1 | |
| # with: | |
| # directory: charts | |
| # config: .kube-linter.yaml | |
| # TODO: debug & fix | |
| # - name: Create kind cluster | |
| # uses: helm/[email protected] | |
| # if: steps.list-changed.outputs.changed == 'true' | |
| # - name: Run chart-testing (install) | |
| # run: ct install $CHARTS_DIRECTORIES_ARG --target-branch ${{ github.event.repository.default_branch }} | |
| # if: steps.list-changed.outputs.changed == 'true' |