From 55f32338d2fa4497715c666cfd8f83bc59e45be0 Mon Sep 17 00:00:00 2001 From: Humair Khan Date: Sat, 9 Mar 2024 10:31:58 -0500 Subject: [PATCH] test workflow Signed-off-by: Humair Khan --- .github/workflows/build-images-test.yaml | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/build-images-test.yaml diff --git a/.github/workflows/build-images-test.yaml b/.github/workflows/build-images-test.yaml new file mode 100644 index 000000000000..a30e0a31fd42 --- /dev/null +++ b/.github/workflows/build-images-test.yaml @@ -0,0 +1,86 @@ +name: Build images from sources. +run-name: Build images from sources. +on: + workflow_call: + inputs: + src_branch: + type: string + default: 'ubi_images' + description: 'Source branch to build DSP from' + required: true + target_tag: + type: string + default: 'ubi-test-1' + description: 'Target Image Tag' + required: true + quay_org: + type: string + default: 'hukhan' + description: 'Quay Organization' + required: true + overwrite_imgs: + type: string + default: 'true' + description: 'Overwrite images in quay if they already exist for this release.' + required: true + fail_fast: + type: string + default: 'true' + description: 'Stop running entire Workflow if a single build fails' + required: true + + workflow_dispatch: + inputs: + src_branch: + type: string + default: 'v1.0.x' + description: 'Source branch to build DSP from' + required: true + target_tag: + type: string + default: 'vx.y.z' + description: 'Target Image Tag' + required: true + quay_org: + type: string + default: 'opendatahub' + description: 'Quay Organization' + required: true + overwrite_imgs: + type: string + default: 'true' + description: 'Overwrite images in quay if they already exist for this release.' + required: true + fail_fast: + type: string + default: 'true' + description: 'Stop running entire Workflow if a single build fails' + required: true +env: + SOURCE_BRANCH: ${{ inputs.src_branch }} + QUAY_ORG: ${{ inputs.quay_org }} + QUAY_ID: ${{ secrets.QUAY_ROBOT_USERNAME }} + QUAY_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} + TARGET_IMAGE_TAG: ${{ inputs.target_tag }} + OVERWRITE_IMAGES: ${{ inputs.overwrite_imgs }} +jobs: + build-images-with-tag: + continue-on-error: false + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + fail-fast: ${{ inputs.fail_fast == 'true' }} + matrix: + include: + - image: ds-pipelines-api-server + dockerfile: backend/Dockerfile + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/build + name: Build Image + with: + IMAGE_REPO: ${{ matrix.image }} + DOCKERFILE: ${{ matrix.dockerfile }} + GH_REPO: ${{ github.repository }} + OVERWRITE: ${{ env.OVERWRITE_IMAGES }}