From 5b506f04667c3a161274bcffa0ac75529205037b Mon Sep 17 00:00:00 2001 From: "Harold Spencer Jr." Date: Mon, 6 Oct 2025 11:52:29 -0700 Subject: [PATCH] Update formatting of yaml and fix inplace commands for yq in github action (#107) --- .github/workflows/build-release.yml | 4 +-- marketplace-revision-release.yaml | 46 +++++++++++++++-------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index ff83d3c..4229dd4 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -141,9 +141,9 @@ jobs: env: IMAGE_RELEASE_TAG: ${{ steps.bump-version.outputs.tag }} run: | - yq -i '(.ChangeSet[].EntityTags | select(.Key == "Release") | .Value) = "$IMAGE_RELEASE_TAG"' marketplace-revision-release.yaml + yq -i '(.ChangeSet[].EntityTags | ( .[] | select(.Key == "Release") ) | .Value) = "$IMAGE_RELEASE_TAG"' marketplace-revision-release.yaml yq -i '.ChangeSet[].DetailsDocument.Version.VersionTitle = "Release $IMAGE_RELEASE_TAG"' marketplace-revision-release.yaml - yq -i '(.ChangeSetTags[] | select(.Key == "Release") | .Value) = $IMAGE_RELEASE_TAG' marketplace-revision-release.yaml + yq -i '(.ChangeSetTags[] | ( .[] | select(.Key == "Release") ) | .Value) = $IMAGE_RELEASE_TAG' marketplace-revision-release.yaml yq -i '.ChangeSetName = "Add New Release $IMAGE_RELEASE_TAG"' marketplace-revision-release.yaml - name: Update Release Notes in marketplace-revision-release.yaml diff --git a/marketplace-revision-release.yaml b/marketplace-revision-release.yaml index d8157bf..7d35bcb 100644 --- a/marketplace-revision-release.yaml +++ b/marketplace-revision-release.yaml @@ -1,30 +1,32 @@ +--- Catalog: 'AWSMarketplace' ChangeSet: -- ChangeType: 'AddDeliveryOptions' - Entity: - Type: 'ContainerProduct@1.0' - Identifier: 'prod-ixigokshzjrpw@41' - EntityTags: + - ChangeType: 'AddDeliveryOptions' + Entity: + Type: 'ContainerProduct@1.0' + Identifier: 'prod-ixigokshzjrpw@41' + EntityTags: + - Key: 'Release' + Value: '' + - Key: 'CostEntity' + Value: 'SEZC' + - Key: 'IPGroup' + Value: 'KY BAT Ledger Service' + DetailsDocument: { + "Version": { + "ReleaseNotes": "", + "VersionTitle": "" + }, + "DeliveryOptions": "" + } +ChangeSetName: '' +ClientRequestToken: '' +# Set to VALIDATE to test request before applying changes. Default is APPLY. +Intent: 'VALIDATE' +ChangeSetTags: - Key: 'Release' Value: '' - Key: 'CostEntity' Value: 'SEZC' - Key: 'IPGroup' Value: 'KY BAT Ledger Service' - DetailsDocument: { - "Version": { - "ReleaseNotes": "", - "VersionTitle": "" - }, - "DeliveryOptions": "" - } -ChangeSetName: '' -ClientRequestToken: '' -Intent: 'VALIDATE' # Set to VALIDATE to test request before applying changes. Default is APPLY. -ChangeSetTags: -- Key: 'Release' - Value: '' -- Key: 'CostEntity' - Value: 'SEZC' -- Key: 'IPGroup' - Value: 'KY BAT Ledger Service'