Skip to content

Commit

Permalink
feat: additional logging for happy-cleanup (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Jan 12, 2024
1 parent 4e58084 commit 6dcbbb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/actions/happy-cleanup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ runs:
date=`date +%Y-%m-%d'T'%H:%M'Z' -d "$TIME ago"`
if [[ ! -z ${EXCLUDE} ]]; then
for i in $(happy list --aws-profile "" --output json --env $ENV | jq -r --arg date "$date" --arg exclude "$EXCLUDE" '.[] | select(.last_updated < $date) | select(any(.stack; contains($exclude))|not) | .stack'); do
echo "Deleting stack: $i"
happy delete $i --env $ENV --aws-profile ""
done
exit
fi
for i in $(happy list --aws-profile "" --output json --env $ENV | jq -r --arg date "$date" '.[] | select(.last_updated < $date) | .stack'); do
echo "Deleting stack: $i"
happy delete $i --env $ENV --aws-profile ""
done
Expand Down

0 comments on commit 6dcbbb0

Please sign in to comment.