Fix git unmodified check in CI (#409)

the diff-index picks up changes if files have been touched
This commit is contained in:
Max Ammann
2025-04-03 16:21:26 +02:00
committed by GitHub
parent 5711856363
commit c5733f8dc1

View File

@ -46,7 +46,7 @@ jobs:
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
run: echo "modified=$(if [[ -z $(git status --porcelain --untracked-files=no --ignore-submodules) ]]; then echo "false"; else echo "true"; fi)" >> "$GITHUB_OUTPUT"
- name: Commit changes, if any
if: steps.git-check.outputs.modified == 'true'