Skip to content

Manual - Publish Docker Images #10

Manual - Publish Docker Images

Manual - Publish Docker Images #10

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Manual - Publish Docker Images
on:
workflow_dispatch:
inputs:
node:
default: "xeon"
description: "Hardware to run test"
required: true
type: string
studio_frontend:
description: "Publish studio-frontend image?"
required: true
type: boolean
default: true
studio_backend:
description: "Publish studio-backend image?"
required: true
type: boolean
default: true
app_frontend:
description: "Publish app-frontend image?"
required: true
type: boolean
default: true
app_backend:
description: "Publish app-backend image?"
required: true
type: boolean
default: true
tag:
default: "rc"
description: "Tag to publish, like [1.0rc]"
required: true
type: string
publish_tags:
default: "latest,1.x"
description: "Comma-separated tag list to apply to published images, like [latest,1.0]"
required: false
type: string
permissions: read-all
jobs:
publish:
strategy:
matrix:
include:
- image: "studio-frontend"
run: ${{ inputs.studio_frontend }}
- image: "studio-backend"
run: ${{ inputs.studio_backend }}
- image: "app-frontend"
run: ${{ inputs.app_frontend }}
- image: "app-backend"
run: ${{ inputs.app_backend }}
fail-fast: false
runs-on: "docker-build-${{ inputs.node }}"
steps:
- uses: docker/[email protected]
if: ${{ matrix.run == true }}
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Check if image should be published
if: ${{ matrix.run == true }}
run: echo "Publishing ${{ matrix.image }} image"