feat(midaz): add CRM/Fees/Tracer env vars and update tracer image #222
This file contains hidden or 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: Helm Chart Standard | |
| on: | |
| pull_request: | |
| paths: | |
| - 'charts/**' | |
| - 'docs/helm-chart-standard.md' | |
| - '.github/configs/helm-chart-standard-baseline.yaml' | |
| - '.github/configs/helm-render-values/**' | |
| - '.github/scripts/validate-helm-charts/**' | |
| - '.github/workflows/helm-chart-standard.yml' | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '17 6 * * 1' | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| name: Validate Helm chart standard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Helm | |
| uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: '1.21' | |
| cache-dependency-path: .github/scripts/go.sum | |
| - name: Validate chart standard | |
| working-directory: .github/scripts | |
| run: go run ./validate-helm-charts --root ../.. --strict | |
| - name: Determine render scope | |
| id: render-scope | |
| shell: bash | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| HEAD_SHA: ${{ github.sha }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "$EVENT_NAME" != "pull_request" ]]; then | |
| echo "args=--all" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| changed_files="$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")" | |
| if grep -Eq '^(\.github/scripts/validate-helm-charts/|\.github/configs/helm-render-values/|\.github/workflows/helm-chart-standard\.yml|docs/helm-chart-standard\.md)' <<< "$changed_files"; then | |
| echo "args=--all" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| # Keep only charts whose directory still exists. A deleted chart still | |
| # shows up in `git diff --name-only`, but the render-gate errors with | |
| # "unknown chart" if asked to render a chart that is no longer present. | |
| existing="" | |
| for chart in $(awk -F/ '/^charts\/[^/]+\// {print $2}' <<< "$changed_files" | sort -u); do | |
| if [[ -d "charts/$chart" ]]; then | |
| existing="${existing:+$existing,}$chart" | |
| fi | |
| done | |
| if [[ -z "$existing" ]]; then | |
| echo "args=--all" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| echo "args=--charts $existing" >> "$GITHUB_OUTPUT" | |
| - name: Render chart templates | |
| working-directory: .github/scripts | |
| shell: bash | |
| env: | |
| RENDER_SCOPE_ARGS: ${{ steps.render-scope.outputs.args }} | |
| run: go run ./validate-helm-charts --root ../.. --render-gate $RENDER_SCOPE_ARGS |