Update auto-update-app-headers.yml

This commit is contained in:
CanbiZ 2025-01-28 13:10:03 +01:00 committed by GitHub
parent 9435b9d046
commit 7dc446c8ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,28 +45,26 @@ jobs:
# Step 6: Check if there are any changes
- name: Check if there are any changes
id: verify-diff
run: |
echo "Checking for changes..."
git add -A # Untracked Dateien aufnehmen
git status
if git diff --quiet; then
if git diff --cached --quiet; then
echo "No changes detected."
echo "changed=false" >> $GITHUB_OUTPUT
echo "changed=false" >> "$GITHUB_ENV"
else
echo "Changes detected:"
git diff --stat
echo "changed=true" >> $GITHUB_OUTPUT
git diff --stat --cached
echo "changed=true" >> "$GITHUB_ENV"
fi
# Step 7: Commit changes (if any) and create a PR
# Step 7: Commit and create PR if changes exist
- name: Commit and create PR if changes exist
if: steps.verify-diff.outputs.changed == 'true'
if: env.changed == 'true'
run: |
git add -A
git commit -m "Update .app files"
git checkout -b pr-update-app-files
git push origin pr-update-app-files --force
gh pr create --title "[core] update .app files" \
--body "This PR is auto-generated by a GitHub Action to update the .app files." \
--head pr-update-app-files \
@ -77,6 +75,5 @@ jobs:
# Step 8: Output success message when no changes
- name: No changes detected
if: steps.verify-diff.outputs.changed == 'false'
if: env.changed == 'false'
run: echo "No changes to commit. Workflow completed successfully."