better logic for directory render
Some checks failed
renovate / renovate (push) Has been cancelled

This commit is contained in:
2025-12-02 18:33:31 -06:00
parent 5e89422e25
commit b994d07ff5

View File

@@ -66,11 +66,11 @@ jobs:
run: | run: |
cd ${MAIN_DIR} cd ${MAIN_DIR}
RENDER_DIR_LIST=() RENDER_DIR=()
if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
echo ">> Triggered on dispatch, will check all paths .." echo ">> Triggered on dispatch, will check all paths .."
RENDER_DIR_LIST+=$(ls clusters/cl01tl/helm/) RENDER_DIR+=$(ls clusters/cl01tl/helm/)
else else
echo ">> Checking for changes ..." echo ">> Checking for changes ..."
@@ -80,7 +80,7 @@ jobs:
echo ">> Changes detected:" echo ">> Changes detected:"
echo "$GIT_DIFF" echo "$GIT_DIFF"
for path in $GIT_DIFF; do for path in $GIT_DIFF; do
RENDER_DIR_LIST+=$(echo "$path" | awk -F '/' '{print $4}') RENDER_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
done done
else else
@@ -90,12 +90,11 @@ jobs:
fi fi
echo ">> Directories to Render:" echo ">> Directories to Render:"
RENDER_DIR=($(printf "%s\n" "${RENDER_DIR_LIST[@]}" | sort -u)) printf "%s\n" "${RENDER_DIR[@]}" | sort -u
echo "$RENDER_DIR"
echo "-----" echo "-----"
echo "changes-detected=true" >> $GITEA_OUTPUT echo "changes-detected=true" >> $GITEA_OUTPUT
echo "render-dir=$RENDER_DIR" >> $GITEA_OUTPUT echo "render-dir=$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
- name: Add Repositories - name: Add Repositories
if: steps.check-dir-changes.outputs.changes-detected == 'true' if: steps.check-dir-changes.outputs.changes-detected == 'true'