Add MongoDB charts #181
Workflow file for this run
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
# --------------------------------------------------------- | |
# Title: Continuous Integration | |
# | |
# Uses: | |
# - https://github.com/helm/chart-testing-action | |
# - https://github.com/helm/kind-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@v3.1.0 | |
with: | |
# note: important to have chart-testing work (see https://github.com/helm/chart-testing/issues/186) | |
fetch-depth: 0 | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: 3.10.1 | |
- name: Install Python | |
uses: actions/setup-python@v4.3.0 | |
with: | |
python-version: 3.11 | |
- name: Install chart-testing | |
uses: helm/chart-testing-action@v2.3.1 | |
- 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 | |
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/kind-action@v1.4.0 | |
# 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' |