From 1a9320ced83a1e3f0943cd701d5a8bddd83e4724 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:23:29 +0100 Subject: [PATCH] Update generate-app-headers.yaml --- .github/workflows/generate-app-headers.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate-app-headers.yaml b/.github/workflows/generate-app-headers.yaml index ff9ba61874..8922b8b0d6 100644 --- a/.github/workflows/generate-app-headers.yaml +++ b/.github/workflows/generate-app-headers.yaml @@ -81,11 +81,17 @@ jobs: echo "$(figlet $APP_NAME)" >> .app-headers done - # Step 7: Commit and push changes (if any) - - name: Commit and push changes + # Step 7: Check if there are changes to commit + - name: Check for changes and commit run: | - git diff --quiet -- .app-headers || git commit -am "[core]: update .app-headers to latest version" - git push origin update-app-headers --force + git diff --exit-code --quiet .app-headers + if [ $? -eq 1 ]; then + echo ".app-headers has been updated, committing changes." + git commit -am "[core]: update .app-headers to latest version" + git push origin update-app-headers --force + else + echo "No changes to .app-headers detected, skipping commit." + fi # Step 8: Create Pull Request if changes detected - name: Create Pull Request if changes detected