Skip to content

Commit

Permalink
use GITHUB_ENV instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-schndr committed Sep 17, 2024
1 parent aa4e3b3 commit 2bd6aec
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,24 @@ jobs:
- name: Collect chart directories
id: collect-chart-dirs
run: |
echo "CHART_DIRS=$(find . -type f -name 'Chart.yaml' -printf '%h\n' |sed 's|^\./||' | xargs -I {} dirname {} | sort -u | tr '\n' ',' | sed 's/,$//' )" >> GITHUB_OUTPUT
CHART_DIRS=$(find . -type f -name 'Chart.yaml' -printf '%h\n' |sed 's|^\./||' | xargs -I {} dirname {} | sort -u | tr '\n' ',' | sed 's/,$//' )
echo "found charts in the following directories ${CHART_DIRS}"
echo "CHART_DIRS=$CHART_DIRS" >> GITHUB_ENV
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs=${{ steps.collect-chart-dirs.outputs.CHART_DIRS }} --target-branch ${{ github.event.repository.default_branch }})
changed=$(ct list-changed --chart-dirs=${CHART_DIRS} --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "changed=true" >> "$GITHUB_ENV"
fi
- name: Run chart-testing (lint)
# if: steps.list-changed.outputs.changed == 'true'
# if: $changed == 'true'
run: |
echo "Running helm linter on charts in the following directories:\n${CHART_DIRS}"
ct lint \
--chart-dirs=${{ steps.collect-chart-dirs.outputs.CHART_DIRS }} \
--chart-dirs=${CHART_DIRS} \
--all --validate-maintainers=false \
--target-branch ${{ github.event.repository.default_branch }}

Check failure on line 53 in .github/workflows/helm-lint.yml

View workflow job for this annotation

GitHub Actions / mega-linter-yaml

53:1 [empty-lines] too many blank lines (1 > 0)

0 comments on commit 2bd6aec

Please sign in to comment.