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