diff --git a/.github/workflows/build-and-prepare-release-reusable-workflow.yaml b/.github/workflows/build-and-prepare-release-reusable-workflow.yaml index fae4a11..e49b0e7 100644 --- a/.github/workflows/build-and-prepare-release-reusable-workflow.yaml +++ b/.github/workflows/build-and-prepare-release-reusable-workflow.yaml @@ -50,6 +50,10 @@ on: required: false type: string default: '' + 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 @@ -156,8 +160,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 6b22e55..675f705 100644 --- a/.github/workflows/dev-build-reusable-workflow.yaml +++ b/.github/workflows/dev-build-reusable-workflow.yaml @@ -45,6 +45,11 @@ on: required: false type: string default: '' + default: false + isPostgres: + required: false + type: boolean + default: false secrets: workflow-token: description: 'PAT with repo+workflow scope for the GitOps repo' @@ -127,8 +132,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: |