From 72144e76f92d3297d73ebdb0b03b0bf3f38445de Mon Sep 17 00:00:00 2001 From: mihonninja Date: Wed, 26 Jul 2023 15:01:52 +0300 Subject: [PATCH] Add four image handling --- .github/workflows/cd-pr-multiple-images-kube.yaml | 8 ++++++++ .github/workflows/cd-pr-multiple-images.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/cd-pr-multiple-images-kube.yaml b/.github/workflows/cd-pr-multiple-images-kube.yaml index a58b6bc..97db68a 100644 --- a/.github/workflows/cd-pr-multiple-images-kube.yaml +++ b/.github/workflows/cd-pr-multiple-images-kube.yaml @@ -10,6 +10,9 @@ on: image_name_three: required: true type: string + image_name_four: + required: true + type: string image_tag: required: true type: string @@ -47,6 +50,11 @@ jobs: with: cmd: yq w -i ./kube/${{ inputs.path }}/overlays/${{ inputs.env_name }}/kustomization.yaml "images.(name==${{ inputs.image_name_three }}).newTag" ${{ inputs.image_tag }} + - name: Update kustomization.yaml for image four + uses: mikefarah/yq@3.3.0 + with: + cmd: yq w -i ./kube/${{ inputs.path }}/overlays/${{ inputs.env_name }}/kustomization.yaml "images.(name==${{ inputs.image_name_four }}).newTag" ${{ inputs.image_tag }} + - name: Build uses: docker://automationcloud/kustomize:latest with: diff --git a/.github/workflows/cd-pr-multiple-images.yaml b/.github/workflows/cd-pr-multiple-images.yaml index fd2cbc4..2331591 100644 --- a/.github/workflows/cd-pr-multiple-images.yaml +++ b/.github/workflows/cd-pr-multiple-images.yaml @@ -10,6 +10,9 @@ on: image_name_three: required: true type: string + image_name_four: + required: true + type: string image_tag: required: true type: string @@ -47,6 +50,11 @@ jobs: with: cmd: yq w -i ./configs/${{ inputs.path }}/overlays/${{ inputs.env_name }}/kustomization.yaml "images.(name==${{ inputs.image_name_three }}).newTag" ${{ inputs.image_tag }} + - name: Update kustomization.yaml for image four + uses: mikefarah/yq@3.3.0 + with: + cmd: yq w -i ./configs/${{ inputs.path }}/overlays/${{ inputs.env_name }}/kustomization.yaml "images.(name==${{ inputs.image_name_four }}).newTag" ${{ inputs.image_tag }} + - name: Build uses: docker://automationcloud/kustomize:latest with: