From 139d578ab41f1f61c811d0120b29e45cb4635d63 Mon Sep 17 00:00:00 2001 From: priyaranjanpatil Date: Mon, 4 Dec 2023 14:45:26 +1100 Subject: [PATCH] testing parameter store --- .github/workflows/github-actions.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0398b46a..c3a48277 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -54,11 +54,17 @@ jobs: #parameters=$(aws ssm get-parameters-by-path --path "/YourPath/" --recursive --query 'Parameters[*].[Name,Value]' --output json) echo "$parameters" > parameters.json echo "::set-output name=parameters_json::$parameters" - - for var in $(jq -r '.Parameters[]' parameters.json); do - name=$(echo $var | jq -r .Name) - value=$(echo $var | jq -r .Value) - done + - name: Process Parameters + run: | + # Read the contents of the parameters.json file and loop through them + while IFS= read -r line; do + echo "Processing line: $line" + # Perform actions on each line (JSON object) using jq + # For example, extracting specific fields or values + name=$(echo "$line" | jq -r '.[0]') + value=$(echo "$line" | jq -r '.[1]') + echo "Name: $name, Value: $value" + done < parameters.json # - name: Prepare # id: prep