@@ -175,13 +175,48 @@ jobs:
175175 exit 1
176176 fi
177177
178+ - name : Determine overlays
179+ id : overlays
180+ run : |
181+ OVERLAYS=""
182+
183+ # Function to add overlay path with comma if needed
184+ add_overlay() {
185+ local overlay_path="$1"
186+ if [ -f "$overlay_path" ]; then
187+ if [ -n "$OVERLAYS" ]; then
188+ OVERLAYS="$OVERLAYS,$overlay_path"
189+ else
190+ OVERLAYS="$overlay_path"
191+ fi
192+ fi
193+ }
194+
195+ # Check for doc-specific overlays (list each overlay file individually)
196+ if [ -d "${{ matrix.doc_id }}/overlays" ]; then
197+ find "${{ matrix.doc_id }}/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
198+ add_overlay "$overlay_file"
199+ done
200+ fi
201+
202+ # Check for shared overlays - only apply to cloud APIs
203+ if [[ "${{ matrix.doc_id }}" == "cloud-"* ]] && [ -d "shared/overlays" ]; then
204+ find "shared/overlays" -name "*.yaml" -type f | sort | while read overlay_file; do
205+ add_overlay "$overlay_file"
206+ done
207+ fi
208+
209+ echo "overlay_paths=$OVERLAYS" >> $GITHUB_OUTPUT
210+ echo "Using overlays: $OVERLAYS"
211+
178212 - name : Comment pull request with API diff
179213 uses : bump-sh/github-action@v1
180214 with :
181215 hub : redpanda
182216 doc : ${{ matrix.doc_id }}
183217 token : ${{secrets.BUMP_TOKEN}}
184218 file : ${{ steps.format.outputs.file_path }}
219+ overlay : ${{ steps.overlays.outputs.overlay_paths }}
185220 command : diff
186221 env :
187- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
222+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments