Skip to content

Commit 3d9d3b1

Browse files
committed
Fix GitHub Action to pick up overlay paths
1 parent 5f40741 commit 3d9d3b1

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

.github/workflows/bump.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,29 @@ jobs:
107107
run: |
108108
OVERLAYS=""
109109
110-
# Function to add overlay path with comma if needed
111-
add_overlay() {
112-
local overlay_path="$1"
113-
if [ -f "$overlay_path" ]; then
114-
if [ -n "$OVERLAYS" ]; then
115-
OVERLAYS="$OVERLAYS,$overlay_path"
116-
else
117-
OVERLAYS="$overlay_path"
118-
fi
119-
fi
120-
}
121-
122-
# Check for doc-specific overlays (list each overlay file individually)
110+
# Check for doc-specific overlays
123111
if [ -d "${{ matrix.doc_id }}/overlays" ]; then
124-
find "${{ matrix.doc_id }}/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
125-
add_overlay "$overlay_file"
112+
for overlay_file in "${{ matrix.doc_id }}/overlays"/*.yaml; do
113+
if [ -f "$overlay_file" ]; then
114+
if [ -n "$OVERLAYS" ]; then
115+
OVERLAYS="$OVERLAYS,$overlay_file"
116+
else
117+
OVERLAYS="$overlay_file"
118+
fi
119+
fi
126120
done
127121
fi
128122
129123
# Check for shared overlays - only apply to cloud APIs
130124
if [[ "${{ matrix.doc_id }}" == "cloud-"* ]] && [ -d "shared/overlays" ]; then
131-
find "shared/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
132-
add_overlay "$overlay_file"
125+
for overlay_file in shared/overlays/*.yaml; do
126+
if [ -f "$overlay_file" ]; then
127+
if [ -n "$OVERLAYS" ]; then
128+
OVERLAYS="$OVERLAYS,$overlay_file"
129+
else
130+
OVERLAYS="$overlay_file"
131+
fi
132+
fi
133133
done
134134
fi
135135
@@ -178,29 +178,29 @@ jobs:
178178
run: |
179179
OVERLAYS=""
180180
181-
# Function to add overlay path with comma if needed
182-
add_overlay() {
183-
local overlay_path="$1"
184-
if [ -f "$overlay_path" ]; then
185-
if [ -n "$OVERLAYS" ]; then
186-
OVERLAYS="$OVERLAYS,$overlay_path"
187-
else
188-
OVERLAYS="$overlay_path"
189-
fi
190-
fi
191-
}
192-
193-
# Check for doc-specific overlays (list each overlay file individually)
181+
# Check for doc-specific overlays
194182
if [ -d "${{ matrix.doc_id }}/overlays" ]; then
195-
find "${{ matrix.doc_id }}/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
196-
add_overlay "$overlay_file"
183+
for overlay_file in "${{ matrix.doc_id }}/overlays"/*.yaml; do
184+
if [ -f "$overlay_file" ]; then
185+
if [ -n "$OVERLAYS" ]; then
186+
OVERLAYS="$OVERLAYS,$overlay_file"
187+
else
188+
OVERLAYS="$overlay_file"
189+
fi
190+
fi
197191
done
198192
fi
199193
200194
# Check for shared overlays - only apply to cloud APIs
201195
if [[ "${{ matrix.doc_id }}" == "cloud-"* ]] && [ -d "shared/overlays" ]; then
202-
find "shared/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
203-
add_overlay "$overlay_file"
196+
for overlay_file in shared/overlays/*.yaml; do
197+
if [ -f "$overlay_file" ]; then
198+
if [ -n "$OVERLAYS" ]; then
199+
OVERLAYS="$OVERLAYS,$overlay_file"
200+
else
201+
OVERLAYS="$overlay_file"
202+
fi
203+
fi
204204
done
205205
fi
206206

cloud-controlplane/cloud-controlplane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
components:
22
schemas:
33
AWS.Role:
4-
description: Role identifies AWS role.
4+
description: Role (test) identifies AWS role.
55
properties:
66
arn:
77
description: AWS role ARN.

0 commit comments

Comments
 (0)