From 51cbfbdc4faa2ebfdc63a126a60af2037b04bc9d Mon Sep 17 00:00:00 2001
From: CanbiZ <47820557+MickLesk@users.noreply.github.com>
Date: Fri, 10 Jan 2025 14:30:04 +0100
Subject: [PATCH] Update generate-app-headers.yaml

---
 .github/workflows/generate-app-headers.yaml | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/generate-app-headers.yaml b/.github/workflows/generate-app-headers.yaml
index 146c7e0a3..abab2c501 100644
--- a/.github/workflows/generate-app-headers.yaml
+++ b/.github/workflows/generate-app-headers.yaml
@@ -22,7 +22,13 @@ jobs:
         with:
           fetch-depth: 0  # Ensure we have full access to all branches
 
-      # Step 2: Merge main into update-app-headers branch
+      # Step 2: Configure git user
+      - name: Configure Git user
+        run: |
+          git config --global user.name "GitHub Actions"
+          git config --global user.email "actions@github.com"
+
+      # Step 3: Merge main into update-app-headers
       - name: Merge main into update-app-headers
         run: |
           git fetch origin
@@ -30,7 +36,7 @@ jobs:
           git merge origin/main --no-ff --no-edit
           git push origin update-app-headers --force
 
-      # Step 3: Ensure .app-headers file exists and initialize it
+      # Step 4: Ensure .app-headers file exists and initialize it
       - name: Initialize .app-headers file
         run: |
           if [ ! -f "ct/.app-headers" ]; then
@@ -38,7 +44,7 @@ jobs:
             touch ct/.app-headers
           fi
 
-      # Step 4: Loop through ct/ scripts and execute figlet if APP= is found
+      # Step 5: Loop through ct/ scripts and execute figlet if APP= is found
       - name: Update .app-headers with figlet output
         run: |
           echo "Updating .app-headers with figlet output."
@@ -50,13 +56,13 @@ jobs:
             fi
           done
           
-      # Step 5: Commit the changes to .app-headers
+      # Step 6: Commit the changes to .app-headers
       - name: Commit updated .app-headers
         run: |
           git diff --quiet -- ct/.app-headers || git commit -am "[core]: update .app-headers to latest version"
           git push origin update-app-headers --force
 
-      # Step 6: Create Pull Request to merge changes into main
+      # Step 7: Create Pull Request to merge changes into main
       - name: Create Pull Request if changes detected
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -73,7 +79,7 @@ jobs:
             echo "PR already exists."
           fi
 
-      # Step 7: Automatically merge PR
+      # Step 8: Automatically merge PR
       - name: Automatically merge PR
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -87,7 +93,7 @@ jobs:
             echo "No PR found to merge."
           fi
 
-      # Step 8: Final status output
+      # Step 9: Final status output
       - name: Output final status
         run: |
           echo "Workflow completed successfully. Branch and PR status updated."