Skip to content

Update application versions #200

Update application versions

Update application versions #200

Workflow file for this run

name: 'Lint'
on:
pull_request:
jobs:
lint-shell:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- name: 'Run ShellCheck'
uses: 'ludeeus/action-shellcheck@master'
lint-helm:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- name: 'Set up Helm'
uses: 'azure/setup-helm@v3.5'
with:
version: 'v3.12.0'
- name: 'Identify changed charts'
id: changed-charts
run: |
#!/bin/bash
BASE_BRANCH=${{ github.base_ref }}
BASE_BRANCH=${BASE_BRANCH:-'main'} # default to main if not set
git fetch origin "$BASE_BRANCH" --depth=1 # Fetch base branch
git diff --name-only ${{ github.sha }} FETCH_HEAD
CHANGED_FILES=$(git diff --name-only ${{ github.sha }} FETCH_HEAD | grep '^charts/' | awk -F/ '{print $2}' | uniq)
CHANGED_CHARTS=""
for chart in $CHANGED_FILES; do
if [[ -d "./charts/$chart" ]]; then
CHANGED_CHARTS="$CHANGED_CHARTS $chart"
fi
done
echo "CHANGED_CHARTS=${CHANGED_CHARTS}" >> $GITHUB_ENV
- name: 'Update dependencies for changed charts'
if: env.CHANGED_CHARTS != ''
run: |
#!/bin/bash
IFS=' ' read -r -a CHARTS <<< "$CHANGED_CHARTS"
for chart in "${CHARTS[@]}"; do
echo "Updating dependencies for $chart"
helm dependency update "./charts/${chart}"
done
# Lint Helm charts
- name: 'Lint Helm charts'
if: env.CHANGED_CHARTS != ''
run: 'make lint CHARTS="$CHANGED_CHARTS"'