change to select all on dispatch
All checks were successful
renovate / renovate (push) Successful in 2m1s
All checks were successful
renovate / renovate (push) Successful in 2m1s
This commit is contained in:
@@ -64,29 +64,33 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ${MAIN_DIR}
|
cd ${MAIN_DIR}
|
||||||
|
|
||||||
|
echo ">> Check for changes ..."
|
||||||
|
|
||||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
||||||
CHANGED_DIR=()
|
CHANGED_DIR=()
|
||||||
|
|
||||||
echo ">> Checking for changes .."
|
if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
|
||||||
echo "$GIT_DIFF"
|
echo ">> Triggered on dispatch, will check all paths .."
|
||||||
|
CHANGED_DIR=$(ls clusters/cl01tl/helm/)
|
||||||
if [ -n $GIT_DIFF ]; then
|
|
||||||
echo ">> Changes detected"
|
|
||||||
|
|
||||||
|
elif [ -n $GIT_DIFF ]; then
|
||||||
|
echo ">> Changes detected:"
|
||||||
|
echo "$GIT_DIFF"
|
||||||
for path in $GIT_DIFF; do
|
for path in $GIT_DIFF; do
|
||||||
CHANGED_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
CHANGED_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ">> Changes Directories:"
|
|
||||||
echo "$(printf "%s\n" "$CHANGED_DIR" | sort -u)"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "changed-dir=$(printf "%s\n" "$CHANGED_DIR" | sort -u)" >> $GITEA_OUTPUT
|
|
||||||
else
|
else
|
||||||
echo ">> No changes detected, skipping rendering"
|
echo ">> No changes detected, skipping rendering"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo ">> Changed Directories:"
|
||||||
|
echo "$(printf "%s\n" "$CHANGED_DIR" | sort -u)"
|
||||||
|
|
||||||
|
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||||
|
echo "changed-dir=$(printf "%s\n" "$CHANGED_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'
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user