diff --git a/.github/workflows/generate-code.yml b/.github/workflows/generate-code.yml index 3854eb46..672b61a6 100644 --- a/.github/workflows/generate-code.yml +++ b/.github/workflows/generate-code.yml @@ -37,8 +37,13 @@ jobs: - name: Generate code run: python3 generate-code.py - run: | - diff=$(git --no-pager diff --name-only) - echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV + diff_files=$(git --no-pager diff --name-only) + diff_excluding_submodule=$(echo "$diff_files" | grep -v '^line-openapi$' || true) + + echo "diff files: $diff_files" + echo "diff excluding submodule: $diff_excluding_submodule" + + echo "DIFF_IS_EMPTY=$([[ -z "$diff_excluding_submodule" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV ## Run if diff exists and pull request, and make CI status failure (but allow renovate bot) - if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }}