Examples publish docker image on manual event #17
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 publish docker image on manual event | |
on: | |
workflow_dispatch: | |
inputs: | |
node: | |
default: "gaudi" | |
description: "Hardware to run test" | |
required: true | |
type: string | |
examples: | |
default: "" | |
description: 'List of examples to publish [AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA]' | |
required: false | |
type: string | |
images: | |
default: "" | |
description: 'List of images to publish [gmcmanager,gmcrouter]' | |
required: false | |
type: string | |
tag: | |
default: "rc" | |
description: "Tag to publish, like [1.0rc]" | |
required: true | |
type: string | |
publish_tags: | |
default: "latest,1.x" | |
description: "Tag list apply to publish images, like [latest,1.0]" | |
required: false | |
type: string | |
permissions: read-all | |
jobs: | |
get-image-list: | |
uses: ./.github/workflows/_get-image-list.yml | |
with: | |
examples: ${{ inputs.examples }} | |
images: ${{ inputs.images }} | |
publish: | |
needs: [get-image-list] | |
strategy: | |
matrix: | |
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }} | |
runs-on: "docker-build-${{ inputs.node }}" | |
steps: | |
- uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Image Publish | |
uses: opea-project/validation/actions/image-publish@main | |
with: | |
local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }} | |
image_name: opea/${{ matrix.image }} | |
publish_tags: ${{ inputs.publish_tags }} |