build(deps): bump actions/checkout from 6 to 7 in the github-actions … #1472
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
| # Copyright Built On Envoy | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # The full text of the Apache license is available in the LICENSE file at | |
| # the root of the repo. | |
| name: Extensions | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/** | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| env: | |
| GOPROXY: https://proxy.golang.org | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dorny/paths-filter@v4 | |
| id: changes | |
| with: | |
| filters: | | |
| extensions: | |
| - 'extensions/**' | |
| predicate-quantifier: every # Make the filters be AND-ed | |
| token: "" # don't use github api | |
| outputs: | |
| extensions: ${{ steps.changes.outputs.extensions }} | |
| discover: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.extensions == 'true' }} | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rust-extensions: ${{ steps.discover.outputs.rust-extensions }} | |
| extproc-extensions: ${{ steps.discover.outputs.extproc-extensions }} | |
| has-composer: ${{ steps.discover.outputs.has-composer }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Discover extensions | |
| id: discover | |
| run: | | |
| # Discover extensions and their languages | |
| extensions="[]" | |
| for dir in extensions/*/; do | |
| # Skip if not a directory | |
| [ -d "$dir" ] || continue | |
| ext_path=$(basename "$dir") | |
| manifest="$dir/manifest.yaml" | |
| # Skip if no manifest | |
| [ -f "$manifest" ] || continue | |
| # Read name and type from manifest | |
| ext_name=$(yq '.name' "$manifest") | |
| type=$(yq '.type' "$manifest") | |
| # Detect language | |
| lang="" | |
| if [ -f "$dir/Cargo.toml" ]; then | |
| lang="rust" | |
| elif [ -f "$dir/go.mod" ]; then | |
| lang="go" | |
| elif [ "$type" = "lua" ]; then | |
| lang="lua" | |
| fi | |
| echo "Found extension: $ext_name (type=$type, lang=$lang, path=$ext_path)" | |
| # Add to extensions array | |
| if [ -n "$lang" ]; then | |
| extensions=$(echo "$extensions" | jq -c \ | |
| --arg name "$ext_name" \ | |
| --arg type "$type" \ | |
| --arg lang "$lang" \ | |
| --arg path "$ext_path" \ | |
| '. + [{name: $name, type: $type, language: $lang, path: $path}]') | |
| fi | |
| done | |
| # Filter Rust extensions | |
| rust_extensions=$(echo "$extensions" | jq -c '[.[] | select(.language == "rust")]') | |
| # Filter ExtProc extensions | |
| extproc_extensions=$(echo "$extensions" | jq -c '[.[] | select(.type == "ext_proc")]') | |
| # Check if composer extension exists | |
| has_composer=$(echo "$extensions" | jq '[.[] | select(.name == "composer")] | length > 0') | |
| echo "rust-extensions=$rust_extensions" >> $GITHUB_OUTPUT | |
| echo "extproc-extensions=$extproc_extensions" >> $GITHUB_OUTPUT | |
| echo "has-composer=$has_composer" >> $GITHUB_OUTPUT | |
| echo "Rust extensions: $rust_extensions" | |
| echo "ExtProc extensions: $extproc_extensions" | |
| echo "Has composer: $has_composer" | |
| rust-checks: | |
| needs: discover | |
| if: ${{ needs.discover.outputs.rust-extensions != '[]' }} | |
| uses: ./.github/workflows/extensions-rust.yaml | |
| with: | |
| extensions: ${{ needs.discover.outputs.rust-extensions }} | |
| secrets: inherit | |
| go-checks: | |
| needs: discover | |
| if: ${{ needs.discover.outputs.has-composer == 'true' }} | |
| uses: ./.github/workflows/extensions-go.yaml | |
| secrets: inherit | |
| extproc-checks: | |
| needs: discover | |
| if: ${{ needs.discover.outputs.extproc-extensions != '[]' }} | |
| uses: ./.github/workflows/extensions-extproc.yaml | |
| with: | |
| extensions: ${{ needs.discover.outputs.extproc-extensions }} | |
| secrets: inherit | |
| # Aggregate all the required jobs and make it easier to customize CI required jobs | |
| extensions-checks: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - discover | |
| - rust-checks | |
| - go-checks | |
| - extproc-checks | |
| # We need this to run always to force-fail (and not skip) if any needed | |
| # job has failed. Otherwise, a skipped job will not fail the workflow. | |
| if: always() | |
| steps: | |
| - run: | | |
| echo "Extension checks completed" | |
| [ "${{ | |
| contains(needs.*.result, 'failure') || | |
| contains(needs.*.result, 'cancelled') | |
| }}" == "false" ] || exit 1 |