diff --git a/.github/workflows/generate-app-headers.yaml b/.github/workflows/generate-app-headers.yaml index 78d3cb67..19e261e6 100644 --- a/.github/workflows/generate-app-headers.yaml +++ b/.github/workflows/generate-app-headers.yaml @@ -42,11 +42,11 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add misc/.app-headers - git commit -m "[core]: update .app-headers to latest version" + # Check if there are changes to commit + git diff --quiet || git commit -am "[core]: update .app-headers to latest version" - # Push changes to the branch - git push origin update-app-headers --force + # Push changes to the branch only if there are changes + git push origin update-app-headers --force || echo "No changes to push" - name: Create pull request id: create-pr