From 2885ed1918be76c96c4035d1e433c359054b0776 Mon Sep 17 00:00:00 2001 From: sahil sharma Date: Fri, 26 Jun 2026 11:57:18 +0100 Subject: [PATCH] updates the reusable workflow , adds Postgres flag for updating images in gitops --- ...uild-and-prepare-release-reusable-workflow.yaml | 12 ++++++++++-- .github/workflows/dev-build-reusable-workflow.yaml | 14 +++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-prepare-release-reusable-workflow.yaml b/.github/workflows/build-and-prepare-release-reusable-workflow.yaml index 1272a9a9..5715a96d 100644 --- a/.github/workflows/build-and-prepare-release-reusable-workflow.yaml +++ b/.github/workflows/build-and-prepare-release-reusable-workflow.yaml @@ -45,6 +45,10 @@ on: required: false type: boolean default: false + isPostgres: + required: false + type: boolean + default: false version-tag: description: 'Optional image tag to use instead of digest (e.g. 1.2.3). If omitted, the image digest is used.' required: false @@ -149,8 +153,12 @@ jobs: if: ${{ inputs.ishelm-deployment }} with: cmd: | - yq e -i '.image_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ - './${{ inputs.gitops-patch-path }}' + if ["${{ inputs.isPostgres }}" == "true" ]; then + yq e -i '.image_duo_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ + './${{ inputs.gitops-patch-path }}' + else + yq e -i '.image_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ + './${{ inputs.gitops-patch-path }}' - name: Commit and push changes run: | diff --git a/.github/workflows/dev-build-reusable-workflow.yaml b/.github/workflows/dev-build-reusable-workflow.yaml index a97942d8..3576224c 100644 --- a/.github/workflows/dev-build-reusable-workflow.yaml +++ b/.github/workflows/dev-build-reusable-workflow.yaml @@ -39,7 +39,11 @@ on: ishelm-deployment: required: false type: boolean - default: false + default: false + isPostgres: + required: false + type: boolean + default: false secrets: workflow-token: description: 'PAT with repo+workflow scope for the GitOps repo' @@ -120,8 +124,12 @@ jobs: if: ${{ inputs.ishelm-deployment }} with: cmd: | - yq e -i '.image_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ - './${{ inputs.gitops-patch-path }}' + if ["${{ inputs.isPostgres }}" == "true" ]; then + yq e -i '.image_duo_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ + './${{ inputs.gitops-patch-path }}' + else + yq e -i '.image_ref = "${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}@${{ needs.build_and_push.outputs.image-digest }}"' \ + './${{ inputs.gitops-patch-path }}' - name: Commit and push changes run: |