From e384874d8bebce68a9d9dee5a470e90b4f26c388 Mon Sep 17 00:00:00 2001 From: Berry Davenport Date: Tue, 30 Jul 2024 11:44:37 -0400 Subject: [PATCH] Add or to keep exit code from surfacing if no results found --- .github/workflows/audit-account.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/audit-account.yml b/.github/workflows/audit-account.yml index b8e468269..06d750394 100644 --- a/.github/workflows/audit-account.yml +++ b/.github/workflows/audit-account.yml @@ -64,19 +64,19 @@ jobs: echo "Reports with no entries will be omitted" CI_ACTIVE="$(./audit-account.sh ci_active resources.json)" [[ $(jq -r 'length' <<< "${CI_ACTIVE}") -gt 0 ]] && jq -r '(.[0] - | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_ACTIVE}" > reports/ci_active.csv + | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_ACTIVE}" > reports/ci_active.csv || : CI_INACTIVE="$(./audit-account.sh ci_inactive resources.json)" [[ $(jq -r 'length' <<< "${CI_INACTIVE}") -gt 0 ]] && jq -r '(.[0] - | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_INACTIVE}" > reports/ci_inactive.csv + | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CI_INACTIVE}" > reports/ci_inactive.csv || : CF_OTHER="$(./audit-account.sh cf_other resources.json)" [[ $(jq -r 'length' <<< "${CF_OTHER}") -gt 0 ]] && jq -r '(.[0] - | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CF_OTHER}" > reports/cf_other.csv + | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${CF_OTHER}" > reports/cf_other.csv || : UNTAGGED="$(./audit-account.sh untagged resources.json)" [[ $(jq -r 'length' <<< "${UNTAGGED}") -gt 0 ]] && jq -r '(.[0] - | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${UNTAGGED}" > reports/untagged.csv + | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${UNTAGGED}" > reports/untagged.csv || : TOPICS="$(./audit-account.sh orphaned_topics)" [[ $(jq -r 'length' <<< "${TOPICS}") -gt 0 ]] && jq -r '(.[0] - | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${TOPICS}" > reports/orphaned_topics.csv + | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' <<< "${TOPICS}" > reports/orphaned_topics.csv || : - name: Upload reports uses: actions/upload-artifact@v4 with: