chore(deps): update chainguard-dev/actions action to v1.6.35 #1135
Workflow file for this run
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: Test Charts | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release-[0-9]+.[0-9]+ | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| discover-charts: | |
| name: Discover changed charts | |
| runs-on: ubuntu-latest | |
| outputs: | |
| charts: ${{ steps.list.outputs.charts }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: List changed charts | |
| id: list | |
| env: | |
| TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} | |
| run: | | |
| ci_changed=$(git diff --name-only "origin/${TARGET_BRANCH}"...HEAD -- .github/actions/test-charts/ .github/workflows/test.yaml ct.yaml ct-install.yaml) | |
| if [[ -n "$ci_changed" ]]; then | |
| echo "CI files changed — testing all charts" | |
| all_charts=true | |
| else | |
| all_charts=false | |
| fi | |
| if [[ "$all_charts" == "true" ]]; then | |
| chart_dirs=$(find charts -mindepth 1 -maxdepth 1 -type d) | |
| else | |
| changed_files=$(git diff --name-only "origin/${TARGET_BRANCH}"...HEAD -- charts/) | |
| if [[ -z "$changed_files" ]]; then | |
| echo "charts=[]" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| chart_dirs=$(echo "$changed_files" | cut -d'/' -f1-2 | sort -u) | |
| fi | |
| excluded=$(yq e '.excluded-charts[]' ct.yaml 2>/dev/null || true) | |
| charts='[]' | |
| while IFS= read -r chart; do | |
| [[ -z "$chart" ]] && continue | |
| [[ ! -d "$chart" ]] && continue | |
| chart_name=$(basename "$chart") | |
| if ! echo "$excluded" | grep -qx "$chart_name"; then | |
| charts=$(echo "$charts" | jq -c --arg c "$chart_name" '. + [$c]') | |
| fi | |
| done <<< "$chart_dirs" | |
| echo "charts=$charts" >> "$GITHUB_OUTPUT" | |
| test-chart: | |
| needs: discover-charts | |
| if: needs.discover-charts.outputs.charts != '[]' | |
| name: Test (${{ matrix.chart }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| chart: ${{ fromJson(needs.discover-charts.outputs.charts) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate full-plugins values for template sanity check | |
| if: matrix.chart == 'rhdh' | |
| run: | | |
| yq e '{"dynamicPlugins": {"includes": .dynamicPlugins.includes}, "intelligentAssistant": {"plugins": .intelligentAssistant.plugins}, "orchestrator": {"plugins": .orchestrator.plugins}}' \ | |
| charts/rhdh/values.yaml > /tmp/rhdh-full-plugins-values.yaml | |
| - name: Test charts | |
| uses: ./.github/actions/test-charts | |
| with: | |
| target_branch: ${{ github.event.pull_request.base.ref }} | |
| chart: charts/${{ matrix.chart }} | |
| monitoring_heartbeat: ${{ vars.TEST_MONITORING_HEARTBEAT_ENABLED || 'false' }} | |
| helm_template_values_file: ${{ matrix.chart == 'rhdh' && '/tmp/rhdh-full-plugins-values.yaml' || '' }} | |
| # Aligning job name with the OpenShift CI config: https://github.com/openshift/release/blob/master/core-services/prow/02_config/redhat-developer/rhdh-chart/_prowconfig.yaml#L18 | |
| status: | |
| name: Test Latest Release | |
| needs: [discover-charts, test-chart] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check test results | |
| run: | | |
| result="${{ needs.test-chart.result }}" | |
| if [[ "$result" != "success" && "$result" != "skipped" ]]; then | |
| echo "Chart tests did not succeed (result: $result)." | |
| exit 1 | |
| fi | |
| echo "All chart tests passed (or no charts to test)." |