Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/cd-pr-multiple-images-kube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/cd-pr-multiple-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
image_name_three:
required: true
type: string
image_name_four:
required: true
Copy link
Contributor

@anthonysterling anthonysterling Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen here with a build that only has three images? Are there any other consumers of this action?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a wise question. It's being used by only one service, but nothing can stop you to use it somewhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like an issue with the whole approach here. Should we just mark every image after 2 as required: false? Would it mean that we have to change logic which rely on image count as well?

type: string
image_tag:
required: true
type: string
Expand Down Expand Up @@ -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:
Expand Down