Reduce and optimize number of product grading calls using a Chord
#21006
Workflow file for this run
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: Lint Helm chart | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| - bugfix | |
| - release/** | |
| - hotfix/** | |
| jobs: | |
| lint: | |
| name: Lint chart | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 | |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: 3.13 | |
| - name: Configure Helm repos | |
| run: |- | |
| helm dependency list ./helm/defectdojo | |
| helm dependency update ./helm/defectdojo | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0 | |
| with: | |
| yamale_version: 4.0.4 | |
| yamllint_version: 1.35.1 | |
| - name: Determine target branch | |
| id: ct-branch-target | |
| run: | | |
| if [ ! -z ${GITHUB_BASE_REF} ]; then | |
| echo "ct-branch=${GITHUB_BASE_REF}" >> $GITHUB_ENV | |
| else | |
| echo "ct-branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
| fi | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --config ct.yaml --target-branch ${{ env.ct-branch}}) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> $GITHUB_ENV | |
| fi | |
| # run version check only if not dev as in dev we have a `x.y.z-dev` version | |
| # x.y.z gets bumped automatically when doing a release | |
| - name: Run chart-testing (lint) | |
| run: ct lint --config ct.yaml --target-branch ${{ env.ct-branch }} --check-version-increment=true | |
| if: ${{ env.changed == 'true' && env.ct-branch != 'dev' && env.ct-branch != 'bugfix' }} | |
| # run all checks but version increment always when something changed | |
| - name: Run chart-testing (lint) | |
| run: ct lint --config ct.yaml --target-branch ${{ env.ct-branch }} --check-version-increment=false | |
| if: env.changed == 'true' | |
| # - name: Create kind cluster | |
| # uses: helm/kind-action@v1.1.0 | |
| # if: env.changed == 'true' | |
| # - name: Run chart-testing (install) | |
| # run: ct install --config ct.yaml --target-branch ${{ env.ct-branch }} --helm-extra-args '--set createSecret=true --set createRabbitMqSecret=true --set createPostgresqlSecret=true --set timeout=900' | |
| # if: env.changed == 'true' |