Skip to content

Commit ea0d8c4

Browse files
authored
Update script-cleanup.yml
1 parent 9d11db6 commit ea0d8c4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/script-cleanup.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
run: |
3030
echo "Fetching all resource groups in the subscription..."
3131
rgs_json=$(az group list --output json)
32-
33-
# dont exit on errors in this block
32+
33+
# don't exit on errors in this block
3434
set +e
35-
36-
echo "Attempting to delete all resource groups..."
35+
36+
echo "Attempting to delete all resource groups except 'exec-docs-ai'..."
3737
echo "$rgs_json" |
38-
jq -r '.[] | .name' |
38+
jq -r '.[] | select(.name != "exec-docs-ai") | .name' |
3939
while read -r rg_name; do
4040
if [[ -z "$rg_name" ]]; then
4141
echo "Skipping empty resource group name."
@@ -49,6 +49,6 @@ jobs:
4949
&& echo "OK" \
5050
|| echo "⚠️ Skipped (deny-assignment or other error)"
5151
done
52-
53-
# restore exit on error if you need it later
54-
set -e
52+
53+
# restore "exit on error" if you need it later
54+
set -e

0 commit comments

Comments
 (0)