From 480af5929db32bb7729b6be815dd47ede3b4d2cf Mon Sep 17 00:00:00 2001 From: Benoit Ranque Date: Tue, 15 Oct 2024 14:30:48 -0400 Subject: [PATCH] pass args to jq --- .github/workflows/deploy-stage.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-stage.yaml b/.github/workflows/deploy-stage.yaml index 67a3b2f..29d4966 100644 --- a/.github/workflows/deploy-stage.yaml +++ b/.github/workflows/deploy-stage.yaml @@ -336,8 +336,8 @@ jobs: # modify metadata file to add new entry UPDATED_METADATA=cat "${ROOT}/ndc-hub/registry/hasura/clickhouse/metadata.json" | - jq ".overview.latest_version = $GITHUB_REF_NAME" | - jq ".source_code.version |= [{tag: $GITHUB_REF_NAME, hash: $RELEASE_HASH, is_verified: true}] + ." + jq --arg RELEASE_VERSION "$GITHUB_REF_NAME" '.overview.latest_version = $RELEASE_VERSION' | + jq --arg RELEASE_VERSION "$GITHUB_REF_NAME" --arg RELEASE_HASH "$RELEASE_HASH" '.source_code.version |= [{tag: $RELEASE_VERSION, hash: $RELEASE_HASH, is_verified: true}] + .' # write out modified metadata file echo "$UPDATED_METADATA" > "${ROOT}/ndc-hub/registry/hasura/clickhouse/metadata.json"