From ded80544af6ca3c07dff0ea74a5887d5e7dc482a Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Nov 2023 14:04:47 +0800 Subject: [PATCH] auto generate openapi --- .github/workflows/linux.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0aa8af6f..2b0bf628 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,12 +36,13 @@ jobs: - name: generate openapi run: cd tools/openapi && python3 generates.py install-dependencies - - name: Commit and push if www/swagger/openapi.json changed + - name: Commit and push if ./www/swagger/openapi.json changed run: | + git diff --exit-code ./www/swagger/openapi.json || exit 0 git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add www/swagger/openapi.json + git add ./www/swagger/openapi.json git commit -m "update openapi.json" - git push + git push origin HEAD:master