Skip to content

feat :: istio toleration critical pods #87

feat :: istio toleration critical pods

feat :: istio toleration critical pods #87

name: Check Helm Chart Version
on:
push:
paths:
- 'charts/**/Chart.yaml'
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
charts: ${{ steps.check-version.outputs.charts }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Check Chart Version
id: check-version
run: |
echo "{\"include\":[]}" > chart.json
git diff --name-only HEAD^ HEAD | grep Chart.yaml | while read line; do
CHART=$(grep '^name: ' $line | cut -d ' ' -f 2)
VERSION=$(grep '^version: ' $line | cut -d ' ' -f 2)
jq --arg CHART "$CHART" --arg VERSION "$VERSION" '.include += [{"chart":$CHART,"version":$VERSION}]' chart.json > temp.json && mv temp.json chart.json
done
echo "charts=$(jq -c . < ./chart.json)" >> $GITHUB_OUTPUT
cat chart.json
repository-dispatch:
needs: check-version
strategy:
matrix: ${{fromJson(needs.check-version.outputs.charts)}}
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GHP_TOKEN }}
repository: team-xquare/xquare-infrastructure-global
event-type: chart-update
client-payload: |
{
"chart": "${{ matrix.chart }}",
"version": "${{ matrix.version }}"
}