mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-04 15:00:16 +00:00
Update auto-update-app-headers.yml
This commit is contained in:
parent
9435b9d046
commit
7dc446c8ac
19
.github/workflows/auto-update-app-headers.yml
vendored
19
.github/workflows/auto-update-app-headers.yml
vendored
@ -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."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user