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