|
9 | 9 | workflow_dispatch:
|
10 | 10 |
|
11 | 11 | env:
|
12 |
| - examples: "AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA" |
13 |
| - node: gaudi |
14 |
| - tag: latest |
15 |
| - publish_tags: latest |
| 12 | + EXAMPLES: "AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA" |
| 13 | + TAG: "latest" |
| 14 | + PUBLISH_TAGS: "latest" |
16 | 15 |
|
17 | 16 | jobs:
|
18 | 17 | get-build-matrix:
|
19 | 18 | runs-on: ubuntu-latest
|
20 | 19 | outputs:
|
21 |
| - examples: ${{ steps.get-matrix.outputs.examples }} |
| 20 | + examples_json: ${{ steps.get-matrix.outputs.examples_json }} |
| 21 | + EXAMPLES: ${{ steps.get-matrix.outputs.EXAMPLES }} |
| 22 | + TAG: ${{ steps.get-matrix.outputs.TAG }} |
| 23 | + PUBLISH_TAGS: ${{ steps.get-matrix.outputs.PUBLISH_TAGS }} |
22 | 24 | steps:
|
23 | 25 | - name: Create Matrix
|
24 | 26 | id: get-matrix
|
25 | 27 | run: |
|
26 |
| - examples=($(echo ${{ env.examples }} | tr ',' ' ')) |
| 28 | + examples=($(echo ${EXAMPLES} | tr ',' ' ')) |
27 | 29 | examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
|
28 |
| - echo "examples=$examples_json" >> $GITHUB_OUTPUT |
| 30 | + echo "examples_json=$examples_json" >> $GITHUB_OUTPUT |
| 31 | + echo "EXAMPLES=$EXAMPLES" >> $GITHUB_OUTPUT |
| 32 | + echo "TAG=$TAG" >> $GITHUB_OUTPUT |
| 33 | + echo "PUBLISH_TAGS=$PUBLISH_TAGS" >> $GITHUB_OUTPUT |
29 | 34 |
|
30 | 35 | build:
|
31 | 36 | needs: get-build-matrix
|
32 | 37 | strategy:
|
33 | 38 | matrix:
|
34 |
| - example: ${{ fromJSON(needs.get-build-matrix.outputs.examples) }} |
| 39 | + example: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json) }} |
35 | 40 | fail-fast: false
|
36 | 41 | uses: ./.github/workflows/_example-workflow.yml
|
37 | 42 | with:
|
38 |
| - node: ${{ env.node }} |
| 43 | + node: gaudi |
39 | 44 | example: ${{ matrix.example }}
|
40 | 45 | inject_commit: true
|
41 | 46 | secrets: inherit
|
42 | 47 |
|
43 | 48 | get-image-list:
|
| 49 | + needs: get-build-matrix |
44 | 50 | uses: ./.github/workflows/_get-image-list.yml
|
45 | 51 | with:
|
46 |
| - examples: ${{ env.examples }} |
| 52 | + examples: ${{ needs.get-build-matrix.outputs.EXAMPLES }} |
47 | 53 |
|
48 | 54 | publish:
|
49 |
| - needs: [get-image-list, build] |
| 55 | + needs: [get-build-matrix, get-image-list, build] |
50 | 56 | strategy:
|
51 | 57 | matrix:
|
52 | 58 | image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
|
53 |
| - runs-on: "docker-build-${{ env.node }}" |
| 59 | + runs-on: "docker-build-gaudi" |
54 | 60 | steps:
|
55 | 61 | - uses: docker/login-action@v3.2.0
|
56 | 62 | with:
|
|
60 | 66 | - name: Image Publish
|
61 | 67 | uses: opea-project/validation/actions/image-publish@main
|
62 | 68 | with:
|
63 |
| - local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ env.tag }} |
| 69 | + local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ needs.get-build-matrix.outputs.TAG }} |
64 | 70 | image_name: opea/${{ matrix.image }}
|
65 |
| - publish_tags: ${{ env.publish_tags }} |
| 71 | + publish_tags: ${{ needs.get-build-matrix.outputs.PUBLISH_TAGS }} |
0 commit comments