Skip to content

Commit fd2aaad

Browse files
committed
fix: narrow openapi workflow diff check
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> (cherry picked from commit f797dba)
1 parent aecae60 commit fd2aaad

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/openapi.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ jobs:
8787

8888
- name: Check openapi*.json and typescript changes
8989
run: |
90-
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please run \"composer run openapi\" and commit the openapi*.json files and (if applicable) src/types/openapi/openapi*.ts, see the section \"Show changes on failure\" for details' && exit 1)"
90+
git diff --quiet -- openapi*.json src/types/openapi/openapi*.ts || (echo 'Please run "composer run openapi" and commit the openapi*.json files and (if applicable) src/types/openapi/openapi*.ts, see the section "Show changes on failure" for details' && exit 1)
9191
9292
- name: Show changes on failure
9393
if: failure()
9494
run: |
95-
git status
96-
git --no-pager diff
95+
git --no-pager diff -- openapi*.json src/types/openapi/openapi*.ts
9796
exit 1 # make it red to grab attention

0 commit comments

Comments
 (0)