From 77d5b7f1bd4d60ed4e0488bd7c83a846e9fb9265 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Wed, 30 Oct 2024 01:15:01 +0800 Subject: [PATCH 1/6] for test images-commit Signed-off-by: ZePan110 --- .github/workflows/_example-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml index 07e857d61..4c1de94a3 100644 --- a/.github/workflows/_example-workflow.yml +++ b/.github/workflows/_example-workflow.yml @@ -77,7 +77,7 @@ jobs: - name: Build Image if: ${{ fromJSON(inputs.build) }} - uses: opea-project/validation/actions/image-build@main + uses: opea-project/validation/actions/image-build@images-commit with: work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml From 268354604b4c4b32c0bfca62178f15d5f0c025ae Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Mon, 4 Nov 2024 18:59:11 +0800 Subject: [PATCH 2/6] Add mode flag. Signed-off-by: ZePan110 --- .github/workflows/_example-workflow.yml | 6 ++++++ .github/workflows/manual-image-build.yml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml index 4c1de94a3..c5fba085f 100644 --- a/.github/workflows/_example-workflow.yml +++ b/.github/workflows/_example-workflow.yml @@ -40,6 +40,11 @@ on: default: "main" required: false type: string + mode: + default: "CI" + required: false + type: string + jobs: #################################################################################################### # Image Build @@ -83,6 +88,7 @@ jobs: docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml service_list: ${{ inputs.services }} registry: ${OPEA_IMAGE_REPO}opea + mode: ${{ inputs.mode }} tag: ${{ inputs.tag }} #################################################################################################### diff --git a/.github/workflows/manual-image-build.yml b/.github/workflows/manual-image-build.yml index 8a0b0cf2c..bf5ce9af4 100644 --- a/.github/workflows/manual-image-build.yml +++ b/.github/workflows/manual-image-build.yml @@ -30,6 +30,12 @@ on: description: 'OPEA branch for image build' required: false type: string + mode: + default: "CI" + description: "Whether the test range is CI or CD" + required: false + type: string + jobs: get-test-matrix: runs-on: ubuntu-latest @@ -56,4 +62,5 @@ jobs: services: ${{ inputs.services }} tag: ${{ inputs.tag }} opea_branch: ${{ inputs.opea_branch }} + mode: ${{ inputs.mode }} secrets: inherit From ed6a28bf7454e6f63e8c201e453dcfc46ff6cf9e Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Mon, 4 Nov 2024 19:21:04 +0800 Subject: [PATCH 3/6] Switch image-build branch to main. Signed-off-by: ZePan110 --- .github/workflows/_example-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml index c5fba085f..bd9aeffed 100644 --- a/.github/workflows/_example-workflow.yml +++ b/.github/workflows/_example-workflow.yml @@ -82,7 +82,7 @@ jobs: - name: Build Image if: ${{ fromJSON(inputs.build) }} - uses: opea-project/validation/actions/image-build@images-commit + uses: opea-project/validation/actions/image-build@main with: work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml From 0990dae30d5555db0d0de643d183283679d1ed93 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Mon, 4 Nov 2024 23:15:56 +0800 Subject: [PATCH 4/6] Change mode to inject_commit. Signed-off-by: ZePan110 --- .github/workflows/_example-workflow.yml | 8 ++++---- .github/workflows/manual-image-build.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml index bd9aeffed..13163e63b 100644 --- a/.github/workflows/_example-workflow.yml +++ b/.github/workflows/_example-workflow.yml @@ -40,8 +40,8 @@ on: default: "main" required: false type: string - mode: - default: "CI" + inject_commit: + default: false required: false type: string @@ -82,13 +82,13 @@ jobs: - name: Build Image if: ${{ fromJSON(inputs.build) }} - uses: opea-project/validation/actions/image-build@main + uses: opea-project/validation/actions/image-build@images-commit with: work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml service_list: ${{ inputs.services }} registry: ${OPEA_IMAGE_REPO}opea - mode: ${{ inputs.mode }} + inject_commit: ${{ inputs.inject_commit }} tag: ${{ inputs.tag }} #################################################################################################### diff --git a/.github/workflows/manual-image-build.yml b/.github/workflows/manual-image-build.yml index bf5ce9af4..a53261ef7 100644 --- a/.github/workflows/manual-image-build.yml +++ b/.github/workflows/manual-image-build.yml @@ -30,9 +30,9 @@ on: description: 'OPEA branch for image build' required: false type: string - mode: - default: "CI" - description: "Whether the test range is CI or CD" + inject_commit: + default: false + description: "inject commit to docker images true or false" required: false type: string @@ -62,5 +62,5 @@ jobs: services: ${{ inputs.services }} tag: ${{ inputs.tag }} opea_branch: ${{ inputs.opea_branch }} - mode: ${{ inputs.mode }} + inject_commit: ${{ inputs.inject_commit }} secrets: inherit From 83786cef2e270008990c9ab1f94e926e52a7b9e7 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 5 Nov 2024 00:13:28 +0800 Subject: [PATCH 5/6] Add inject_commit flag. Signed-off-by: ZePan110 --- .github/workflows/_example-workflow.yml | 2 +- .github/workflows/manual-example-workflow.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml index 13163e63b..cfed39c95 100644 --- a/.github/workflows/_example-workflow.yml +++ b/.github/workflows/_example-workflow.yml @@ -82,7 +82,7 @@ jobs: - name: Build Image if: ${{ fromJSON(inputs.build) }} - uses: opea-project/validation/actions/image-build@images-commit + uses: opea-project/validation/actions/image-build@main with: work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml index 03ba728c7..c4fd40828 100644 --- a/.github/workflows/manual-example-workflow.yml +++ b/.github/workflows/manual-example-workflow.yml @@ -50,6 +50,11 @@ on: description: 'OPEA branch for image build' required: false type: string + inject_commit: + default: false + description: "inject commit to docker images true or false" + required: false + type: string permissions: read-all jobs: @@ -101,4 +106,5 @@ jobs: test_k8s: ${{ fromJSON(inputs.test_k8s) }} test_gmc: ${{ fromJSON(inputs.test_gmc) }} opea_branch: ${{ inputs.opea_branch }} + inject_commit: ${{ inputs.inject_commit }} secrets: inherit From 63721733512a620cbafdd4ff03a227c72b373d4d Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 5 Nov 2024 00:52:54 +0800 Subject: [PATCH 6/6] Change defaults. Signed-off-by: ZePan110 --- .github/workflows/manual-example-workflow.yml | 2 +- .github/workflows/manual-image-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml index c4fd40828..9e31f26d7 100644 --- a/.github/workflows/manual-example-workflow.yml +++ b/.github/workflows/manual-example-workflow.yml @@ -51,7 +51,7 @@ on: required: false type: string inject_commit: - default: false + default: true description: "inject commit to docker images true or false" required: false type: string diff --git a/.github/workflows/manual-image-build.yml b/.github/workflows/manual-image-build.yml index a53261ef7..53ba750ed 100644 --- a/.github/workflows/manual-image-build.yml +++ b/.github/workflows/manual-image-build.yml @@ -31,7 +31,7 @@ on: required: false type: string inject_commit: - default: false + default: true description: "inject commit to docker images true or false" required: false type: string