Skip to content

Commit 432e854

Browse files
Fix git unmodified check in CI (#408)
* Fix git unmodified check in CI the diff-index picks up changes if files have been touched * Update generate.yml * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b70dd57 commit 432e854

File tree

2 files changed

+421
-421
lines changed

2 files changed

+421
-421
lines changed

.github/workflows/generate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Check for modified files
3030
id: git-check
31-
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
31+
run: echo "modified=$(if [[ -z $(git status --porcelain --untracked-files=no --ignore-submodules) ]]; then echo "false"; else echo "true"; fi)" >> "$GITHUB_OUTPUT"
3232

3333
- name: Commit changes, if any
3434
if: steps.git-check.outputs.modified == 'true'

0 commit comments

Comments
 (0)