Skip to content

Commit 13edaed

Browse files
committed
NO-ISSUE Do not create PR when only line-openapi is updated and code is not changed (renovate will update)
1 parent 191c342 commit 13edaed

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/generate-code.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
with:
2121
submodules: recursive
22-
- name: Update submodules
23-
run: git submodule update --remote --recursive
22+
# - name: Update submodules
23+
# run: git submodule update --remote --recursive
2424
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
2525
id: setup_node_id
2626
with:
@@ -39,8 +39,9 @@ jobs:
3939
- name: Generate code
4040
run: python3 generate-code.py
4141
- run: |
42-
diff=$(git --no-pager diff --name-only)
43-
echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
42+
diff_files=$(git --no-pager diff --name-only)
43+
diff_excluding_submodule=$(echo "$diff" | grep -v '^line-openapi$' || true)
44+
echo "DIFF_IS_EMPTY=$([[ -z "diff_excluding_submodule" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
4445
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
4546
## Run if diff exists and pull request, and make CI status failure (but allow renovate bot)
4647
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }}

0 commit comments

Comments
 (0)