Auto release updated charts #1
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
name: PR Validation | |
on: | |
pull_request: | |
paths: | |
- 'charts/**' | |
jobs: | |
lint-charts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
- name: Identify Changed Charts | |
id: changed_charts | |
run: | | |
CHANGED_CHARTS=$(git diff --name-only origin/${{ github.base_ref }} --diff-filter=ACDMRT | grep '^charts/' | awk -F/ '{print $2}' | uniq | tr '\n' ' ') | |
echo "CHANGED_CHARTS=$CHANGED_CHARTS" >> $GITHUB_ENV | |
- name: Lint Changed Charts | |
if: env.CHANGED_CHARTS != '' | |
run: | | |
for chart in $CHANGED_CHARTS; do | |
CHART_PATH="charts/$chart" | |
if [ -d "$CHART_PATH" ]; then | |
echo "Linting $chart..." | |
helm lint $CHART_PATH | |
fi | |
done |