Skip to content

Commit cf86ace

Browse files
authored
Update nightly image build jobs (#1070)
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent c2b7bd2 commit cf86ace

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

.github/workflows/nightly-docker-build-publish.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,54 @@ on:
99
workflow_dispatch:
1010

1111
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"
1615

1716
jobs:
1817
get-build-matrix:
1918
runs-on: ubuntu-latest
2019
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 }}
2224
steps:
2325
- name: Create Matrix
2426
id: get-matrix
2527
run: |
26-
examples=($(echo ${{ env.examples }} | tr ',' ' '))
28+
examples=($(echo ${EXAMPLES} | tr ',' ' '))
2729
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
2934
3035
build:
3136
needs: get-build-matrix
3237
strategy:
3338
matrix:
34-
example: ${{ fromJSON(needs.get-build-matrix.outputs.examples) }}
39+
example: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json) }}
3540
fail-fast: false
3641
uses: ./.github/workflows/_example-workflow.yml
3742
with:
38-
node: ${{ env.node }}
43+
node: gaudi
3944
example: ${{ matrix.example }}
4045
inject_commit: true
4146
secrets: inherit
4247

4348
get-image-list:
49+
needs: get-build-matrix
4450
uses: ./.github/workflows/_get-image-list.yml
4551
with:
46-
examples: ${{ env.examples }}
52+
examples: ${{ needs.get-build-matrix.outputs.EXAMPLES }}
4753

4854
publish:
49-
needs: [get-image-list, build]
55+
needs: [get-build-matrix, get-image-list, build]
5056
strategy:
5157
matrix:
5258
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
53-
runs-on: "docker-build-${{ env.node }}"
59+
runs-on: "docker-build-gaudi"
5460
steps:
5561
- uses: docker/login-action@v3.2.0
5662
with:
@@ -60,6 +66,6 @@ jobs:
6066
- name: Image Publish
6167
uses: opea-project/validation/actions/image-publish@main
6268
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 }}
6470
image_name: opea/${{ matrix.image }}
65-
publish_tags: ${{ env.publish_tags }}
71+
publish_tags: ${{ needs.get-build-matrix.outputs.PUBLISH_TAGS }}

0 commit comments

Comments
 (0)