Examples CD workflow on manual event #5
Workflow file for this run
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
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
name: Examples CD workflow on manual event | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
nodes: | ||
default: "gaudi,xeon" | ||
description: "Hardware to run test" | ||
required: true | ||
type: string | ||
examples: | ||
default: "ChatQnA" | ||
description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]' | ||
required: true | ||
type: string | ||
tag: | ||
default: "latest" | ||
description: "Tag to apply to images" | ||
required: true | ||
type: string | ||
build: | ||
default: true | ||
description: 'Build test required images for Examples' | ||
required: false | ||
type: boolean | ||
scan: | ||
default: true | ||
description: 'Scan all images with Trivy' | ||
required: false | ||
type: boolean | ||
test_compose: | ||
default: true | ||
description: 'Test examples with docker compose' | ||
required: false | ||
type: boolean | ||
test_k8s: | ||
default: false | ||
description: 'Test examples with k8s' | ||
required: false | ||
type: boolean | ||
GenAIComps_branch: | ||
default: "main" | ||
description: 'GenAIComps branch for image build' | ||
required: false | ||
type: string | ||
permissions: read-all | ||
jobs: | ||
get-test-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
examples: ${{ steps.get-matrix.outputs.examples }} | ||
nodes: ${{ steps.get-matrix.outputs.nodes }} | ||
steps: | ||
- name: Create Matrix | ||
id: get-matrix | ||
run: | | ||
examples=($(echo ${{ inputs.examples }} | tr ',' ' ')) | ||
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.') | ||
echo "examples=$examples_json" >> $GITHUB_OUTPUT | ||
nodes=($(echo ${{ inputs.nodes }} | tr ',' ' ')) | ||
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.') | ||
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT | ||
run-examples: | ||
needs: [get-test-matrix] | ||
strategy: | ||
matrix: | ||
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }} | ||
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }} | ||
fail-fast: false | ||
uses: ./.github/workflows/_example-workflow.yml | ||
Check failure on line 74 in .github/workflows/manual-example-workflow.yml GitHub Actions / Examples CD workflow on manual eventInvalid workflow file
|
||
with: | ||
node: ${{ matrix.node }} | ||
example: ${{ matrix.example }} | ||
tag: ${{ inputs.tag }} | ||
build: ${{ fromJSON(inputs.build) }} | ||
scan: ${{ fromJSON(inputs.scan) }} | ||
test_compose: ${{ fromJSON(inputs.test_compose) }} | ||
test_k8s: ${{ fromJSON(inputs.test_k8s) }} | ||
GenAIComps_branch: ${{ inputs.GenAIComps_branch }} | ||
secrets: inherit |