Skip to content

Commit

Permalink
ci(fix): replace code for chart-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
JacekZubielik committed May 23, 2024
1 parent 37a0d89 commit 4401210
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,37 @@
# fi


# - name: Run chart-testing (list-changed)
# id: list-changed
# run: |
# ## If executed with debug this won't work anymore.
# changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
# charts=$(echo "$changed" | tr '\n' ' ' | xargs)
# if [[ -n "$changed" ]]; then
# echo "::set-output name=changed::true"
# echo "::set-output name=changed_charts::$charts"
# fi

- name: Run chart-testing (list-changed)
id: list-changed
run: |
## If executed with debug this won't work anymore.
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "::set-output name=changed_charts::$charts"
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "changed_charts=$charts" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml

- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
with:
config: ./.github/configs/kind-config.yaml
# - name: Create kind cluster
# uses: helm/[email protected]
# if: steps.list-changed.outputs.changed == 'true'
# with:
# config: ./.github/configs/kind-config.yaml

- name: Run chart-testing (install)
run: ct install --config ./.github/configs/ct-install.yaml
if: steps.list-changed.outputs.changed == 'true'
# - name: Run chart-testing (install)
# run: ct install --config ./.github/configs/ct-install.yaml
# if: steps.list-changed.outputs.changed == 'true'

0 comments on commit 4401210

Please sign in to comment.