diff --git a/.github/workflows/generate-code.yml b/.github/workflows/generate-code.yml index 001e17851..23de3907b 100644 --- a/.github/workflows/generate-code.yml +++ b/.github/workflows/generate-code.yml @@ -25,7 +25,7 @@ jobs: id: setup_node_id with: node-version: 18 - - name: actions/setup-java@v3 + - name: Set up Java uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: distribution: 'temurin' @@ -39,8 +39,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]' }}