Run base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
  base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
  
  if [[ "false" == "true" ]]; then
    base_cmd+=" --include-spacelift-admin-stacks=true"
  elif [[ "false" == "true" ]]; then
    base_cmd+=" --include-dependents=true"
  fi
  
  if [[ -n "dev-wus3" ]]; then
    base_cmd+=" --stack=dev-wus3"
  fi
  
  if [[ "false" == "true" ]]; then
    base_cmd+=" --skip=terraform.output"
  fi
  
  if [[ "true" == "false" ]]; then
    base_cmd+=" --process-templates=false"
  fi
  
  if [[ "true" == "false" ]]; then
    base_cmd+=" --process-functions=false"
  fi
  eval "$base_cmd"
  affected=$(jq -c '.' affected-stacks.json)
  printf "%s" "affected=$affected" >> $GITHUB_OUTPUT
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ATMOS_CLI_CONFIG_PATH: /runner/_work/aegp-elvis-iac/pepe-iac/config
    ATMOS_BASE_PATH: ./
    ATMOS_VERSION: 1.188.0
    ARM_USE_OIDC: true
    ENVIRONMENT: DEV
  
✓ Fetching api_management_identity output from apimanagement/be in dev-wus3
✓ Fetching storage_account_primary_web_hostname output from web-app-storage in dev-wus3
✓ Fetching .frontdoor_custom_domain_validation_tokens["pepe.cloud"] output from frontdoor in dev-wus3
Run cloudposse/github-action-matrix-extended@v0
Run cloudposse/github-action-jq@v0
/usr/bin/jq -c def name: null;
def group: null;
def nestedMatricesLevelsAre(v): 1 == v; 
def chunk: .key / 256 | floor;
def groupName: [(.value | group), (chunk | if . == 0 then empty else . end)] | join(" ");
def groupRange: [first, last] | map(.value | name) | join(" - ");
def toGHAMatrix: {"include": . } ;
def oneLevelMatrix: . ;
def twoLevelMatrix: 
    group_by(group) |
    map( to_entries | group_by(chunk) | 
        map({
            "name": first | groupName,
            "items": map(.value) | toGHAMatrix | tostring
        })
    ) | flatten;
def threeLevelMatrix:
    group_by(group) |
    map({
      "name": first | group,
      "items": ( to_entries | group_by(chunk) | 
        map({
          "name": groupRange,
          "items": map(.value) | toGHAMatrix | tostring
        }) | toGHAMatrix | tostring
      )
    });
def groupingStrategy:
    if nestedMatricesLevelsAre(3) then 
        threeLevelMatrix
    elif nestedMatricesLevelsAre(2)  then 
        twoLevelMatrix 
    else 
        oneLevelMatrix 
    end; 
def parseInput:
    if type == "array" then . else .include end;
parseInput | sort_by(name) | groupingStrategy | toGHAMatrix affected-stacks.json
{"include":[{"component":"servicebus","component_type":"terraform","component_path":"components/terraform/servicebus","stack":"dev-wus3","stack_slug":"dev-wus3-servicebus","affected":"stack.metadata","affected_all":["stack.metadata","stack.vars"],"dependents":null,"included_in_dependents":false,"settings":null},{"component":"cosmosdb","component_type":"terraform","component_path":"components/terraform/cosmos","stack":"dev-wus3","stack_slug":"dev-wus3-cosmosdb","affected":"stack.metadata","affected_all":["stack.metadata"],"dependents":null,"included_in_dependents":false,"settings":null},{"component":"web-app-storage","component_type":"terraform","component_path":"components/terraform/storage","stack":"dev-wus3","stack_slug":"dev-wus3-web-app-storage","affected":"stack.metadata","affected_all":["stack.metadata","stack.vars"],"dependents":null,"included_in_dependents":false,"settings":null},{"component":"github-actions-state","component_type":"terraform","component_path":"components/terraform/storage","stack":"d