Update generate-app-headers.yaml

This commit is contained in:
CanbiZ 2025-01-10 12:52:59 +01:00 committed by GitHub
parent ece84cbe70
commit 6e56610e28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,11 +46,16 @@ jobs:
git checkout update-app-headers git checkout update-app-headers
fi fi
# Step 5: Check if there are changes before # Step 5: Ensure .app-headers file exists (if missing, create it)
- name: Check if there are any changes before making any modifications - name: Ensure .app-headers file exists
run: | run: |
git fetch origin if [ ! -f ".app-headers" ]; then
git diff --exit-code || echo "There are changes to commit." echo "The .app-headers file does not exist. Creating it."
touch .app-headers
echo "Generated by CI" > .app-headers
else
echo ".app-headers already exists."
fi
# Step 6: Setup Figlet (Install and set up Figlet for text generation) # Step 6: Setup Figlet (Install and set up Figlet for text generation)
- name: Set up Figlet - name: Set up Figlet
@ -61,9 +66,8 @@ jobs:
run: | run: |
bash .github/workflows/generate-app-headers.sh bash .github/workflows/generate-app-headers.sh
# Step 8: Check if changes are available (Check if the app-headers file has been modified) # Step 8: Check if there are changes
- name: Check if changes are available - name: Check for changes
id: check-changes
run: | run: |
git diff --exit-code || echo "Changes detected." git diff --exit-code || echo "Changes detected."
@ -114,4 +118,4 @@ jobs:
# Step 15: Complete (Final confirmation that workflow has finished) # Step 15: Complete (Final confirmation that workflow has finished)
- name: Complete - name: Complete
run: | run: |
echo "Workflow has completed successfully."