[GHA] Update go-monorepo chart #26
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: Tempalte changed charts | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- charts/** | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
generate-matrix: | |
outputs: | |
list: ${{ steps.list.outputs.list }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@1c938490c880156b746568a518594309cfb3f66b #v40.2.1 | |
with: | |
dir_names: true | |
dir_names_exclude_current_dir: true | |
dir_names_max_depth: 2 | |
- name: Show changes | |
id: list | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
echo "$file was changed" | |
done | |
echo ${{ steps.changed-files.outputs.all_changed_files }} | tr " " "\n" | grep charts | xargs -n 1 basename | tr "\n" " " | jq -R -s -c 'split(" ")[:-1]' > res.json | |
echo "list<<EOF" >> $GITHUB_OUTPUT | |
cat res.json >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
template: | |
runs-on: ubuntu-latest | |
needs: | |
- generate-matrix | |
strategy: | |
matrix: | |
chart: ${{ fromJson(needs.generate-matrix.outputs.list) }} | |
defaults: | |
run: | |
working-directory: charts/${{ matrix.chart }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update dependencies | |
run: helm dependency update | |
- name: Helm template | |
run: helm template . |