I am writing a GitHub action which will detect that if any change was made to helm charts directory charts-v2/core
and charts-v2/platform
which has many charts in the main branch ( after a PR is merged ) .
Somehow I never get the changed charts using the below workflow
name: Release Charts to chart museaum
on:
push:
branches:
- helm-autopush-charts-org
paths:
- 'charts-v2/**'
jobs:
release:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed charts
id: get-changed-charts
run: |
CHANGED_CHARTS=$(git show --format="" --name-only | xargs dirname | grep -E 'charts-v2/(core|platform)' | awk -F'/' '{print $1"/"$2"/"$3}' | sort | uniq)
CHANGED_CHARTS=$(echo "$CHANGED_CHARTS" | tr 'n' ' ')
echo "::set-output name=changed_charts::$CHANGED_CHARTS"