better logic for directory render
All checks were successful
renovate / renovate (push) Successful in 1m24s

This commit is contained in:
2025-12-02 18:16:59 -06:00
parent 7d38102cff
commit 85112d34ad

View File

@@ -59,6 +59,8 @@ jobs:
git checkout -b $BRANCH_NAME
fi
echo "-----"
- name: Check which Directories have Changes
id: check-dir-changes
run: |
@@ -90,6 +92,8 @@ jobs:
echo ">> Directories to Render:"
echo "$(printf "%s\n" "$RENDER_DIR" | sort -u)"
echo "-----"
echo "changes-detected=true" >> $GITEA_OUTPUT
echo "render-dir=$(printf "%s\n" "$RENDER_DIR" | sort -u)" >> $GITEA_OUTPUT
@@ -108,6 +112,8 @@ jobs:
| while read cmd; do echo "$cmd" | sh; done || true
done
echo "-----"
- name: Remove Changed Manifest Files
if: steps.check-dir-changes.outputs.changes-detected == 'true'
env:
@@ -124,6 +130,8 @@ jobs:
rm -rf $chart_path/*
done
echo "-----"
- name: Render Helm Manifests
id: render-manifests
if: steps.check-dir-changes.outputs.changes-detected == 'true'
@@ -169,6 +177,8 @@ jobs:
fi
done
echo "-----"
- name: Check for Changes
id: check-changes
if: steps.check-dir-changes.outputs.changes-detected == 'true'
@@ -184,6 +194,8 @@ jobs:
exit 0
fi
echo "-----"
- name: Commit and Push Changes
id: commit-push
if: steps.check-changes.outputs.changes-detected == 'true'
@@ -198,6 +210,8 @@ jobs:
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
echo "-----"
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
echo "push=true" >> $GITEA_OUTPUT
@@ -253,6 +267,8 @@ jobs:
echo "pull-request-exists=false" >> $GITEA_OUTPUT
fi
echo "-----"
- name: Create Pull Request
id: create-pull-request
if: steps.commit-push.outputs.push == 'true' && steps.check-for-pull-requst.outputs.pull-request-exists == 'false'
@@ -318,6 +334,8 @@ jobs:
exit 1
fi
echo "-----"
- name: Cleanup Branch
if: failure() && steps.create-pull-request.outcome == 'failure'
env:
@@ -326,6 +344,8 @@ jobs:
echo ">> Removing branch: ${HEAD_BRANCH}"
git push origin --delete ${HEAD_BRANCH}
echo "-----"
- name: ntfy Created
uses: niniyas/ntfy-action@master
if: steps.create-pull-request.outputs.pull-request-operation == 'created'