chore(chart.yaml): 차트 버전을 1.0.63에서 1.0.64로 업데이트 #126
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: 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 }}" | |
} |