Update generate-app-headers.yaml

This commit is contained in:
CanbiZ 2025-01-10 13:11:02 +01:00 committed by GitHub
parent 2dddbaebe4
commit f7d9fe7c3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,17 +38,13 @@ jobs:
echo "The .app-headers file does not exist. Creating it."
echo "Generated by CI" > .app-headers
else
echo ".app-headers already exists. Checking if there are any changes."
echo ".app-headers already exists."
fi
# Verifying if there are changes in .app-headers file content
git diff --quiet -- .app-headers || echo "Changes detected in .app-headers"
# Step 4: Commit changes if detected
- name: Commit changes if detected
if: ${{ steps.verify_changes.outputs.changes_detected == 'true' }}
# Step 4: Commit and push changes (if any)
- name: Commit and push changes (if any)
run: |
git commit -am "[core]: update .app-headers to latest version"
git diff --quiet -- .app-headers || git commit -am "[core]: update .app-headers to latest version"
git push origin update-app-headers --force
# Step 5: Create Pull Request if changes detected
@ -68,9 +64,8 @@ jobs:
echo "PR already exists."
fi
# Step 6: Automatically merge the PR if no conflicts
# Step 6: Automatically merge PR
- name: Automatically merge PR
if: ${{ steps.verify_changes.outputs.changes_detected == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |