Skip to content

update GMC image build and test workflow (#303) #1

update GMC image build and test workflow (#303)

update GMC image build and test workflow (#303) #1

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Upgrade GMC system on push event
on:
push:
branches: ["main"]
paths:
- microservices-connector/**
- "!microservices-connector/helm/**"
- "!**.md"
- "!**.txt"
- "!**.png"
- "!.**"
- .github/workflows/gmc-on-push.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-on-push
cancel-in-progress: true
env:
GOSRC_DIR: "microservices-connector"
jobs:
image-build:
strategy:
matrix:
platform: [xeon, gaudi]
uses: ./.github/workflows/_gmc-image-build.yaml
with:
image_tag: 'latest'
runner_label: 'docker-build-${{ matrix.platform }}'
gmc-install:
strategy:
matrix:
platform: [xeon, gaudi]
needs: image-build
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set variables
run: |
echo "SYSTEM_NAMESPACE=opea-system" >> $GITHUB_ENV
# don't set IMAGE_REPO to the outputs because outputs.image_repo may not be correct
# echo "IMAGE_REPO=${{ needs.image-build.outputs.image_repo }}" >> $GITHUB_ENV
echo "VERSION=${{ needs.image-build.outputs.image_tag }}" >> $GITHUB_ENV
- name: Cleanup existing GMC
run: |
.github/workflows/scripts/e2e/gmc_install.sh cleanup_gmc
- name: Install GMC
run: |
.github/workflows/scripts/e2e/gmc_install.sh install_gmc